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.