bug修复

This commit is contained in:
xugaoyi 2019-12-21 17:54:21 +08:00
parent f29858dbc2
commit 9af64dc50f
6 changed files with 38 additions and 53 deletions

View File

@ -96,32 +96,32 @@ set -e # 确保脚本抛出遇到的错误
npm run build # 生成静态文件
cd docs/.vuepress/dist # 进入生成的文件夹
# deploy to coding
echo 'www.evanblogweb.com\nevanblogweb.com' > CNAME # 自定义域名
if [ -z "$CODING_TOKEN" ]; then # -z <字符串> 长度为0则为true$CODING_TOKEN来自于github仓库`Settings/Secrets`设置的私密环境变量
# deploy to github
echo 'b.evanblogweb.com' > CNAME
if [ -z "$GITHUB_TOKEN" ]; then
msg='deploy'
codingUrl=git@git.dev.tencent.com:xugaoyi/xugaoyi.git
githubUrl=git@github.com:xugaoyi/blog.git
else
msg='来自github action的自动部署'
codingUrl=https://xugaoyi:${CODING_TOKEN}@git.dev.tencent.com/xugaoyi/xugaoyi.git
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/blog.git
git config --global user.name "xugaoyi"
git config --global user.email "894072666@qq.com"
fi
git init
git add -A
git commit -m "${msg}"
git push -f $codingUrl master # 推送到coding
git push -f $githubUrl master:gh-pages # 推送到github
# deploy to github
echo 'b.evanblogweb.com' > CNAME
if [ -z "$GITHUB_TOKEN" ]; then
githubUrl=git@github.com:xugaoyi/blog.git
# deploy to coding
echo 'www.evanblogweb.com\nevanblogweb.com' > CNAME # 自定义域名
if [ -z "$CODING_TOKEN" ]; then # -z 字符串 长度为0则为true$CODING_TOKEN来自于github仓库`Settings/Secrets`设置的私密环境变量
codingUrl=git@git.dev.tencent.com:xugaoyi/xugaoyi.git
else
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/blog.git
codingUrl=https://xugaoyi:${CODING_TOKEN}@git.dev.tencent.com/xugaoyi/xugaoyi.git
fi
git add -A
git commit -m "${msg}"
git push -f $githubUrl master:gh-pages # 推送到github
git push -f $codingUrl master # 推送到coding
cd - # 退回开始所在目录
rm -rf docs/.vuepress/dist

View File

@ -9,32 +9,32 @@ npm run build
# 进入生成的文件夹
cd docs/.vuepress/dist
# deploy to coding
echo 'www.evanblogweb.com\nevanblogweb.com' > CNAME # 自定义域名
if [ -z "$CODING_TOKEN" ]; then # -z 字符串 长度为0则为true$CODING_TOKEN来自于github仓库`Settings/Secrets`设置的私密环境变量
# deploy to github
echo 'b.evanblogweb.com' > CNAME
if [ -z "$GITHUB_TOKEN" ]; then
msg='deploy'
codingUrl=git@git.dev.tencent.com:xugaoyi/xugaoyi.git
githubUrl=git@github.com:xugaoyi/blog.git
else
msg='来自github action的自动部署'
codingUrl=https://xugaoyi:${CODING_TOKEN}@git.dev.tencent.com/xugaoyi/xugaoyi.git
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/blog.git
git config --global user.name "xugaoyi"
git config --global user.email "894072666@qq.com"
fi
git init
git add -A
git commit -m "${msg}"
git push -f $codingUrl master # 推送到coding
git push -f $githubUrl master:gh-pages # 推送到github
# deploy to github
echo 'b.evanblogweb.com' > CNAME
if [ -z "$GITHUB_TOKEN" ]; then
githubUrl=git@github.com:xugaoyi/blog.git
# deploy to coding
echo 'www.evanblogweb.com\nevanblogweb.com' > CNAME # 自定义域名
if [ -z "$CODING_TOKEN" ]; then # -z 字符串 长度为0则为true$CODING_TOKEN来自于github仓库`Settings/Secrets`设置的私密环境变量
codingUrl=git@git.dev.tencent.com:xugaoyi/xugaoyi.git
else
githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/blog.git
codingUrl=https://xugaoyi:${CODING_TOKEN}@git.dev.tencent.com/xugaoyi/xugaoyi.git
fi
git add -A
git commit -m "${msg}"
git push -f $githubUrl master:gh-pages # 推送到github
git push -f $codingUrl master # 推送到coding
cd - # 退回开始所在目录

View File

@ -24,22 +24,6 @@ module.exports = {
// editLinkText: '在 Github 上编辑此页',
// displayAllHeaders: true, // 默认值false
},
// locales: {
// // 键名是该语言所属的子路径
// // 作为特例,默认语言可以使用 '/' 作为其路径。
// '/': {
// lang: 'zh-CN', // 将会被设置为 <html> 的 lang 属性
// title: 'Evan 博客',
// description:
// '博客文章列表,包括儿童编程、儿童教育及程序开发、个人感悟等主题 '
// },
// '/en/': {
// lang: 'en-US',
// title: 'Evan Blog',
// description:
// "children's programming, children's education and program development"
// }
// },
plugins: [ // 插件
'vuepress-plugin-baidu-autopush', // 百度自动推送,作用:加快将页面推送给百度搜索
'@vuepress/back-to-top', // 返回顶部
@ -68,20 +52,20 @@ module.exports = {
owner: 'xugaoyi', // GitHub仓库所有者
admin: ['xugaoyi'], // 对仓库有写权限的人
distractionFreeMode: false,
id: "<%- md5(window.location.origin + window.location.pathname) %>", // 页面的唯一标识,长度不能超过50
title: "「评论」<%- document.title %>", // GitHub issue 的标题
id: "<%- (window.location.origin + (frontmatter.to.path || window.location.pathname)).slice(-50) %>", // 页面的唯一标识,长度不能超过50
title: "「评论」来自 <%- window.location.origin + (frontmatter.to.path || window.location.pathname) %>", // GitHub issue 的标题
labels: ["Gitalk", "Comment"], // GitHub issue 的标签
body:"<%- document.title %><%- window.location.origin + window.location.pathname %>" // GitHub issue 的内容
body:"<%- window.location.origin + (frontmatter.to.path || window.location.pathname) %>" // GitHub issue 的内容
}
}
]
],
configureWebpack: {
//webpack别名 如![Image from alias](~@alias/image.png)
resolve: {
alias: {
'@alias': 'path/to/some/dir'
}
}
}
// configureWebpack: {
// //webpack别名 如![Image from alias](~@alias/image.png)
// resolve: {
// alias: {
// '@alias': 'path/to/some/dir'
// }
// }
// }
}

View File

@ -46,7 +46,7 @@ module.exports = { // 侧边栏
title: '学习',
collapsable: false,
children: [
['LearningAndMemory','学习网学习效果低,忘性很大怎么办?'],
['LearningAndMemory','学习效果低,忘性很大怎么办?'],
['study','学习网站分享'],
]
},

View File

@ -7,3 +7,5 @@
@media (max-width: $MQMobileNarrow)
padding 1.5rem
.sidebar
z-index 11

View File

@ -12,7 +12,6 @@
"@vuepress/plugin-back-to-top": "^1.2.0",
"@vuepress/plugin-medium-zoom": "^1.2.0",
"ejs": "^3.0.1",
"js-md5": "^0.7.3",
"vuepress": "^1.1.0",
"vuepress-plugin-baidu-autopush": "^1.0.1",
"vuepress-plugin-baidu-tongji": "^1.0.1"