Problem with deploy Nuxt.js in GitHub Pages

I recently started learning Nuxt.Js and faced with the problem of deployment on GitHub Pages.

I do everything according to the instructions:

https://medium.com/@kozyreva.hanna/nuxt-js-gh-pages-deployment-73b88aa3aa65

Infinite nuxt-loading appears on gh-pages instead of content.

GitHub: https://github.com/Owe7x/slide

GH-pages: https://owe7x.github.io/slide/

What could be the problem?

Upvotes: 5

Views: 2144

Answers (1)

Boussadjra Brahim
Boussadjra Brahim

Reputation: 1

I've already tried to follow that steps and they didn't work for me, after some researches I ended up with following steps :

  1. remove the dist entry from .gitignore file
  2. run npm run generate
  3. run git add . then git commit -m "deploy on gh-pages"
  4. We need to add router base configuration in nuxt.config.js:
      target: 'static',
      router: {
        base: '/<repository-name>/'
      }
  1. run git subtree push --prefix dist origin gh-pages

Make sure to delete the current gh-pages branch before running these commands.

Upvotes: 7

Related Questions