readthedocs.org
readthedocs.org copied to clipboard
redirect: Clean file URLs as well
What's the problem this feature will solve?
Currently the clean URL redirects /path/to/my_page/ to /path/to/my_page.html, but it doesn't do that for /path/to/my_page.
Describe the solution you'd like
It would be good to have an equivalent that can to that redirect for the file paths as well (those that do not have any suffix).
Alternative solutions
Tried to write a redirect manually for /* to /:splat.html, but that did not work, not to mention that it would fail for properly suffixed files.
Probably this is an issue that can/should be solved upstream, but I am not sure what solution to suggest to them.
npx serve seems to serve the static files just fine. Would there be any method to mimic that?
Probably this is an issue that can/should be solved upstream, but I am not sure what solution to suggest to them.
What do to mean by upstream here? Whom are them?
npx serveseems to serve the static files just fine. Would there be any method to mimic that?
I'm not sure to follow this. How is npx serve related to this issue here?
Currently the clean URL redirects
/path/to/my_page/to/path/to/my_page.html, but it doesn't do that for/path/to/my_page.
If I understand correctly, the redirect doesn't work when there is no a trailing slash, right?
If I understand correctly, the redirect doesn't work when there is no a trailing slash, right?
Yes, that sums it up
What do to mean by upstream here? Whom are them? I'm not sure to follow this. How is npx serve related to this issue here?
mystmd is the upstream site-generator. Basically is it an issue for the site-generator and/or site hosting? It seems that npx serve does this kind of redirection automatically, that's why I mention it here. But it could be an issue on how the pages are produced, since I don't think sphinx has a similar issue if you open the index.html file manually.
Still, this could be solved on the RTD side as a temporary fix?
Upstream issues:
- https://github.com/executablebooks/mystmd/issues/188
- https://github.com/executablebooks/mystmd/issues/950
- https://github.com/executablebooks/mystmd/issues/984