[SOLVED] 404 error in GitHub Pages even if files exist


#1

Hi there,

I am using gh-pages in GitHub Enterprise to publish docs generated with Hugo. Gh-pages is set to pull the docs from the docs folder in the master branch. And it works. Partially.

Some pages throw a 404 error even if they exist in the docs folder. I also added a .nojekyll file just in case, inside the docs folder, to no avail - not really useful, since there are no files starting with underscores in the Hugo output AFAIK.

I can load those pages correctly in localhost preview, but when I upload them to the repo and open gh-pages, I get the 404s. I double checked the frontmatter, tried change the file names, etc.

What prevents those pages from loading in GH Pages even if the file exists in the right location?

Happy to provide more info if needed. I’m writing this from my phone.


#2

Hi – we’d need to see your git repo to help.


#3

Yep. Alas, it’s a GitHub Enterprise repo. It’s firewalled. Anything else I could paste here? A folder/file tree?


#4

Create a dummy project that reproduces your issue, then put it on github.


#5

Found the problem (and the solution):

I had some folders with a mix of uppercase and lowercase. Hugo server tolerates this, not so GH Pages. Renaming the folders solved the issue. Also learnt about the disablePathToLower param.

Cheers,
F.