From 828d7074658775cd2f792be3f5368efc2ccda188 Mon Sep 17 00:00:00 2001 From: Ruth Fuchss Date: Mon, 9 Mar 2020 12:16:44 +0100 Subject: [PATCH] doc: keep IDs when redirecting URLs When redirecting from old-topic.html#some-id to new-topic.html, the ID is ignored. Not sure if it is possible to keep the ID in the meta redirect, but at least in the JavaScript version we should keep it and redirect from old-topic.html#some-id to new-topic.html#some-id. Signed-off-by: Ruth Fuchss --- doc/extensions/zephyr/html_redirects.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/extensions/zephyr/html_redirects.py b/doc/extensions/zephyr/html_redirects.py index 6ba5afb069d..dc8c1d2b8fb 100644 --- a/doc/extensions/zephyr/html_redirects.py +++ b/doc/extensions/zephyr/html_redirects.py @@ -24,12 +24,19 @@ import os.path from sphinx.builders.html import StandaloneHTMLBuilder -REDIRECT_TEMPLATE = """ +REDIRECT_TEMPLATE = r"""