You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,9 @@ Client-side redirects with meta refresh are okay for search engines, even the mo
11
11
I know better how to write HTML redirect file
12
12
*********************************************
13
13
14
-
By default, created HTML redirect files contains ``<html><head><meta http-equiv="refresh" content="0; url=${to_uri}"></head></html>``.
14
+
By default, created HTML redirect files contains ``<html><head><noscript><meta http-equiv="refresh" content="0; url=${to_uri}" /></noscript><script>var target = "${to_uri}";if (window.location.hash) {window.location.replace(target + window.location.hash);} else {window.location.replace(target);}</script></head></html>``. A little bit of JavaScript is used to handle hash part of the URI (the ``#foo`` in ``https://example.com/docs#foo``).
15
15
16
-
If you want JavaScript redirection instead, wait longer, or whatever, set ``redirect_html_template`` option. This option should points to file inside source dir (directory containing ``conf.py``). For example::
16
+
If you want to change this behavior, you can create your own HTML template. Just set ``redirect_html_template`` option in your ``conf.py`` to point to your template file. The template file should be located in the source directory (the directory containing ``conf.py``). For example::
0 commit comments