将VuePress部署到GitHub页面

问题描述 投票:0回答:1

尝试部署此文档:

https://github.com/aitormendez/democracia/tree/master/docs

至GitHub页面:https://aitormendez.github.io/democracia/

我在本地开发人员和Github中得到了一些不同。

这是本地开发人员的外观:

This is the look in local dev

这是GithHub的外观:

this is the look at GithHub

另外,.vuepress/dist/index.html看起来像:

enter image description here

这是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

我在做什么错?

github web-deployment vuepress
1个回答
0
投票

github选项是错误的。必须将gh-pages分支指定为源。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.