Debian / debiman

debiman generates a static manpage HTML repository out of a Debian archive
Apache License 2.0
185 stars 46 forks source link

Redirecting an anchored URL to a different language breaks the anchor #124

Open mineo opened 3 years ago

mineo commented 3 years ago

Accessing https://manpages.debian.org/man-db/man.1#Controlling_formatted_output automatically redirects me to https://manpages.debian.org/buster/man-db/man.1.de.html#Controlling_formatted_output without jumping to the correct part of the man page (https://manpages.debian.org/buster/man-db/man.1.de.html#Steuerung_der_Ausgabeformatierung).

Ideally, the redirect would somehow land me in the correct place of the man page - for the short one of man, I can figure that out on my own, but for longer ones (bash/zshall) I can't easily do that.

stapelberg commented 3 years ago

That would be nice, but the hash of the URL (everything after #) is not transferred to the server. Therefore, this feature would need to be implemented client-side using JavaScript, which is generally unpopular in parts of Debian, but perhaps justifiable.

We’d also need to generate a mapping between sections in the different languages, which would need to be done heuristically.

So, this is not a quicky or easy fix, but it could be done, if someone wanted to volunteer the work.