3 ms·
I got a bit infuriated by the way GitHub Pages does things like this but doesn't document them anywhere... so I ran a bunch of experiments and wrote a "missing
by simonw 3y ago
I got a bit infuriated by the way GitHub Pages does things like this but doesn't document them anywhere... so I ran a bunch of experiments and wrote a "missing manual" of documentation https://til.simonwillison.net/github/github-pages#user-content-foo-will-serve-content-from-foohtml-if-it-exists https://til.simonwillison.net/github/github-pages#user-conte...
The TLDR version:
/foo will serve content from foo.html, if it exists
/folder will redirect to /folder/
/folder/ will serve folder/index.html
A 404.html file will be used for 404s
The .html rule beats the folder redirect rule
index.json works as an index document too
If there is no index.html or index.json a folder will 404