【发布时间】:2020-08-10 19:16:39
【问题描述】:
尝试部署此文档:
https://github.com/aitormendez/democracia/tree/master/docs
到 GitHub 页面:https://aitormendez.github.io/democracia/
我在本地开发和 Github 中得到了不同的东西。
这是本地开发中的样子:
这是对 GithHub 的看法:
另外,.vuepress/dist/index.html 看起来像:
这是 config.js:
https://github.com/aitormendez/democracia/blob/master/docs/.vuepress/config.js
module.exports = {
home: true,
title: 'Democracia. Manual de uso web',
base: '/democracia/',
themeConfig: {
nav: [
{text: 'Democracia', link: 'https://democracia.com.es'}
],
sidebar: [
{
title: 'Contenido',
collapsable: false,
children: [
'/',
'front-page',
]
},
]
}
}
package.json:
https://github.com/aitormendez/democracia/blob/master/package.json
{
"devDependencies": {
"vuepress": "^1.4.1"
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
}
}
还有deploy.sh
#!/usr/bin/env sh
set -e
npm run docs:build
cd docs/.vuepress/dist
git init
git add -A
git commit -m 'deploy'
git push -f git@github.com:aitormendez/democracia.git master:gh-pages
cd -
AFAIK,我已按照部署到 Github 的步骤进行操作:https://vuepress.vuejs.org/guide/deploy.html#github-pages
我做错了什么?
【问题讨论】:
标签: github web-deployment vuepress