Doc: add anchormap directive for anchor redirects#151113
Doc: add anchormap directive for anchor redirects#151113StanFromIreland wants to merge 1 commit into
anchormap directive for anchor redirects#151113Conversation
Documentation build overview
|
|
Sorry to be negative, but I find the automatic redirect rather confusing. Especially with your example (the mpdec option) on a big screen -- there's not much indication that the thing you were linked to is now gone. I'm not sure this iteration is a net positive, let alone worth the maintenance cost :( |
That's generally how redirects are implemented, although I agree it's not ideal. The
I see, in any case I still think we need to do something. As it stands, the CI check is a really just a doctor who diagnoses you and walks out. ;-) |
See python/docs-community#134 (and python/docs-community#58) for prior discussion and motivation. The
.. anchormap::lets us declareold-anchor: :ref:`new-target`entries, which theanchor_redirects.pyextension resolves at build time and embeds as JSON in the page. A small Javascript script then redirects any achor to its new location.To see it in action, go to: https://cpython-previews--151113.org.readthedocs.build/en/151113/using/configure.html#cmdoption-with-system-libmpdec
For that example, the extension added to
using/configure.html:In this PR I only removed one entry from
removed-ids.txtto serve as an example, the rest can be done in follow-ups.