coq / coq.github.io

Source files of the coq.inria.fr website
https://coq.inria.fr/
Other
15 stars 37 forks source link

propagate hash fragment (=href anchor) when redirecting URLs #236

Closed brandenburg closed 9 months ago

brandenburg commented 9 months ago

When redirecting requests for stdlib or refman pages, propagate the URL's fragment identifer (the string following the '#' sign, if any).

This is required for stdlib URLs so that links generated by coqdoc resolve to specifc identifiers, as intended.

While at it, also preserve the fragment identifier in refman pages, in case someone, somewhere meant to link to specific parts of the reference manual.

Fixes: https://github.com/coq/coq.github.io/issues/235

Aside: tweaked srv/server.py to be able to test the 404 page locally.