尝试部署此文档:
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 [email protected]:aitormendez/democracia.git master:gh-pages
cd -
[AFAIK,我已经遵循了部署到Github的步骤:https://vuepress.vuejs.org/guide/deploy.html#github-pages
我在做什么错?