Open vorburger opened 1 month ago
I've just noticed that you're producing a _redirects
file in dist/
, but that's not a "standard" which (all) web-servers understand, of course.
This also affects /presenter/
, e.g. https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/presenter/ is "broken" (it 404s), even though if you first open https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/ and then open the presenter mode via the lower left corner icon, then it works. This seems strange, on the web.
I've just noticed that you're producing a _redirects file in dist/, but that's not a "standard" ...
According to e.g. https://gitlab.com/gitlab-org/gitlab/-/issues/118593, that _redirects
appears to be a Netlify specific thing; GitHub doesn't appear to have something like that. And even if it, if you wanted to "just host a static website" anywhere else, it again still wouldn't work, without e.g. a RewriteRule
from good ol' mod_rewrite
e.g. in a .htaccess
- but that really shouldn't be necessary, for something like this (IMHO).
try:
routerMode: hash
in headmatter?
Actually, I've just figured that this problem is specific to using GitHub's (older) Pages' "Deploy from a branch" ...
... when using GitHub Actions as documented then it works just fine!
E.g. https://www.vorburger.ch/LearningMachineLearning/4 (now) loads fine (since I've switched).
Let me contribute a small line about this for your docs.
Describe the bug
https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/ works.
https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/1 (which the former URL auto-redirects to!) is broken.
So if I simply Ctrl-R reload, or copy/paste the URL from the address bar to Share with someone in an Email or IM, it's a 404.
This is because you use a "modern" client-side URL history address API.
But a "normal" classical web-server struggles with this - unless one sets up smart rewrite rules as a work-around.
For example, this site is hosted on GitHub Pages (without custom action, just plain old style serving), which struggles with this.
Perhaps you would consider at least an option to simply use old style HTML
#
anchors?So you could make https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/ "redirect" to https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist#1 instead https://www.vorburger.ch/LearningMachineLearning/prez/sli.dev/dist/1.