Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gh-pages with static html can't access file when it exists

The index.html home page displays fine, however any any link will throw a 404.

The static website has folder with html in it, index link to these html with the correct path, but displays a 404.

When clicking on this link, I got a 404.

however the file is present as you can see here .

I am really banging my head on a simple html pb, which is frustrating.

like image 532
Ant Avatar asked Oct 31 '25 23:10

Ant


1 Answers

I ran into this problem myself and finally discovered a simpler solution. The problem is that Jekyll ignores all files that start with _. The simple solution is to add a .nojekyll file to your docs dir.

My docs script looks like this: "rimraf ./docs && typedoc src/ --out docs --mode modules --module commonjs --target es6 --excludePrivate && touch ./docs/.nojekyll && gh-pages -d docs -t"

touch is an npm module that creates the file and the -t flag on gh-pages is necessary to have that dot file uploaded.

like image 63
Jeffery Grajkowski Avatar answered Nov 03 '25 13:11

Jeffery Grajkowski