Skip to content

GitHub Pages do not publish some files from gh-pages branch #55377

Closed Answered by airtower-luna
quincynyan asked this question in Pages
Discussion options

You must be logged in to vote

Going to the URL of the CSS gives me a 404 error.

It's because of the leading underscore in _next. The default Pages build uses Jekyll, and to quote the Jekyll documentation on site structure:

Every file or directory beginning with the following characters: ., _ , # or ~ in the source directory will not be included in the destination folder. Such paths will have to be explicitly specified via the config file in the include directive to make sure they’re copied over:

Any of the following should fix your problem:

  • Rename the _next directory so it doesn't start with one of the excluded characters.
  • Explicitly tell Jekyll to include _next.
  • Disable Jekyll by adding a .nojekyll file to the r…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@quincynyan
Comment options

@quincynyan
Comment options

@airtower-luna
Comment options

@quincynyan
Comment options

@quincynyan
Comment options

Answer selected by quincynyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working correctly Pages Host a static website, right from your repo
2 participants