Thanks for the guide! I also had trouble with CSS, but it was because by default Github Pages ignores the _next directory because it assumes names prefixed with underscore are Jekyll files. You can add a .nojekyll file to the root of your Next public directory (so it ends up in the GH Pages root) to disable Jekyll processing.
I use gh-pages locally to deploy to Github, and to get that to deploy the .nojekyll dotfile, you also have to add the --dotfiles option to it. So in my package.json, my deploy script ends up being "deploy": "gh-pages --dotfiles --dist out".
Thanks for the guide! I also had trouble with CSS, but it was because by default Github Pages ignores the
_next
directory because it assumes names prefixed with underscore are Jekyll files. You can add a.nojekyll
file to the root of your Nextpublic
directory (so it ends up in the GH Pages root) to disable Jekyll processing.I use
gh-pages
locally to deploy to Github, and to get that to deploy the.nojekyll
dotfile, you also have to add the--dotfiles
option to it. So in mypackage.json
, my deploy script ends up being"deploy": "gh-pages --dotfiles --dist out"
.Cheers!
Good to know! Thanks Travis.