LoginSignup
1
1

More than 1 year has passed since last update.

GitHub Pages で Next.js を使う場合に js や CSS などの static ファイルが読み込めない場合の対処法

Posted at

GitHub Pages で Next.js を使おうとしたが、html などのファイルは読み込めているにも関わらず _next 配下の CSS や JS の static ファイルがなぜか 404 になってしまい困った。

結論としては jekyll が悪さをしているので、.nojekyll ファイルを配置するようにすれば治る。

どうやら jekyll の仕様として _ から始まるディレクトリが見えないようでした。。

jekyll ignore files

ref: http://jekyllrb-ja.github.io/docs/structure/

Thanks
https://qiita.com/manten120/items/87e9e822800403904dc8#github-actions-でデプロイするための準備

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1