3 ms·
The problem here is GitHub Pages doesn't support path-based SPA, i.e., it doesn't support rewriting non-asset URLs to site index. I won't argue for or against u
by oefrha 5y ago
The problem here is GitHub Pages doesn't support path-based SPA, i.e., it doesn't support rewriting non-asset URLs to site index. I won't argue for or against using an SPA (without SSR, too) for documentation, but this is certainly one of the most annoying limitations of GitHub Pages in 2021, generally speaking.
- tombl 5y agoIt's a hacky workaround, but by naming your HTML file 404.html it functions just as a regular SPA supporting webserver would. It does send a 404 where a normal webserver would send a 200, but it doesn't cause any problems from my testing.
- lf-non 5y agoOh wow. Don't do this. I have noticed multiple times that when I navigate to some documentation site brave shows this bar that page does not exist and whether you want to access it on archive.org. But the site below is perfectly functional. I always thought that this was some weird server misconfiguration causing 404 even if content is available ... Never guessed it was a hack to enable SPA routing.