Commit 0a0a9038 authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Docs: Take into account the anchor when redirecting.

parent a5e54607
...@@ -462,12 +462,16 @@ pdf_fit_background_mode = 'scale' ...@@ -462,12 +462,16 @@ pdf_fit_background_mode = 'scale'
html_template = """ html_template = """
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="1; url={0}:" />
<script> <script>
window.location.href = "{0}" // Some browsers include the hash character in the anchor, strip it out
const anchor = window.location.hash.replace(/^#(.*)/, '$1');
// Redirect to the new-style URL
window.location = '{}#' + anchor;
</script> </script>
</head> </head>
</html>""" </html>
"""
list_redirects = [('reference/language_basics', 'userguide/language_basics')] list_redirects = [('reference/language_basics', 'userguide/language_basics')]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment