test gitalk

This commit is contained in:
xugaoyi 2019-12-20 13:09:23 +08:00
parent a53a68e557
commit 0b9ce05924
4 changed files with 28 additions and 11 deletions

View File

@ -11,8 +11,8 @@
#### 1、克隆项目后进入
```bash
git clone https://github.com/xugaoyi/evanblog
cd evanblog
git clone https://github.com/xugaoyi/blog
cd blog
```
#### 2、安装依赖并运行开发服务
@ -80,11 +80,11 @@ npm run deploy # 运行部署脚本deploy.sh,并发布到仓库的gh-pages分支
#### 5、部署升级同时部署到github和[coding](https://dev.tencent.com/)
#### 4.1、部署升级同时部署到github和[coding](https://dev.tencent.com/)
为了让博客站能够让百度收录因此我把博客部署到了coding腾讯云开发者平台相关[文章](https://evanblogweb.com/other/baidushoulu.html)。
在原有部署方式上做了升级同时部署到github和coding。
在原有部署方式上做了升级,实现同时部署到github和coding。
`deploy.sh`文件:
@ -115,9 +115,9 @@ git push -f $codingUrl master # 推送到coding
# deploy to github
echo 'b.evanblogweb.com' > CNAME
if [ -z "$GITHUB_TOKEN" ]; then
githubUrl=git@github.com:xugaoyi/evanblog.git
githubUrl=git@github.com:xugaoyi/blog.git
else
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/evanblog.git
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/blog.git
fi
git add -A
git commit -m "${msg}"
@ -149,7 +149,7 @@ jobs: # 工作流
matrix:
node-version: [10.x]
steps: # 步骤
steps:
- name: Checkout # 步骤1
uses: actions/checkout@v1 # 使用的动作。格式userName/repoName。作用检出仓库获取源码。 官方actions库https://github.com/actions
- name: Use Node.js ${{ matrix.node-version }} # 步骤2

View File

@ -28,9 +28,9 @@ git push -f $codingUrl master # 推送到coding
# deploy to github
echo 'b.evanblogweb.com' > CNAME
if [ -z "$GITHUB_TOKEN" ]; then
githubUrl=git@github.com:xugaoyi/evanblog.git
githubUrl=git@github.com:xugaoyi/blog.git
else
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/evanblog.git
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/blog.git
fi
git add -A
git commit -m "${msg}"

View File

@ -44,18 +44,32 @@ module.exports = {
'vuepress-plugin-baidu-autopush', // 百度自动推送,作用:加快将页面推送给百度搜索
'@vuepress/back-to-top', // 返回顶部
[
'@vuepress/medium-zoom',
'@vuepress/medium-zoom', // 缩放图片
{
options: {
background: 'rgba(0,0,0,0.8)'
}
}
], // 缩放图片
],
[
'vuepress-plugin-baidu-tongji', // 百度统计https://tongji.baidu.com
{
hm: '837775213e724293b4af2b9526e238b4'
}
],
[
'vuepress-plugin-comment', // 评论
{
choosen: 'gitalk',
options: {
clientID: 'a6e1355287947096b88b',
clientSecret: 'f0e77d070fabfcd5af95bebb82b2d574d7248d71',
repo: 'blog', // GitHub 仓库
owner: 'xugaoyi', // GitHub仓库所有者
admin: ['xugaoyi'], // 对仓库有写权限的人
distractionFreeMode: false
}
}
]
],
configureWebpack: {

View File

@ -14,5 +14,8 @@
"vuepress": "^1.1.0",
"vuepress-plugin-baidu-autopush": "^1.0.1",
"vuepress-plugin-baidu-tongji": "^1.0.1"
},
"dependencies": {
"vuepress-plugin-comment": "^0.7.2"
}
}