Тим*_*нов 5 github-pages vue.js vue-router nuxt.js
最近开始学习Nuxt.Js,面临GitHub Pages部署的问题。
我按照说明做一切:
https://medium.com/@kozyreva.hanna/nuxt-js-gh-pages-deployment-73b88aa3aa65
无限nuxt-loading出现gh-pages而不是内容。
GitHub: https: //github.com/Owe7x/slide
GH 页面:https://owe7x.github.io/slide/
可能是什么问题呢?
我已经尝试遵循这些步骤,但它们对我不起作用,经过一些研究后,我最终采取了以下步骤:
dist从.gitignore文件中删除该条目npm run generategit add .然后跑git commit -m "deploy on gh-pages"nuxt.config.js: target: 'static',
router: {
base: '/<repository-name>/'
}
Run Code Online (Sandbox Code Playgroud)
git subtree push --prefix dist origin gh-pages 确保gh-pages在运行这些命令之前删除当前分支。