summaryrefslogtreecommitdiffstats
path: root/Doc/tools/templates
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-02-09 15:03:59 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2017-02-09 15:03:59 (GMT)
commite66244521c6e5f37b2964ea5165c6ac9b854b9c7 (patch)
tree7f3ffa1abebff45e0646255e07f2a87a7e13be64 /Doc/tools/templates
parentf59286794b49368e48cbcd8b130b4f030f4f80b9 (diff)
downloadcpython-e66244521c6e5f37b2964ea5165c6ac9b854b9c7.zip
cpython-e66244521c6e5f37b2964ea5165c6ac9b854b9c7.tar.gz
cpython-e66244521c6e5f37b2964ea5165c6ac9b854b9c7.tar.bz2
Issue #26355: Specify canonical URLs in docs pages
Add canonical header link on each page to corresponding major version of the documentation. Patch by Matthias Bussonnier.
Diffstat (limited to 'Doc/tools/templates')
-rw-r--r--Doc/tools/templates/layout.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index 5c180e7..640d8b3 100644
--- a/Doc/tools/templates/layout.html
+++ b/Doc/tools/templates/layout.html
@@ -38,6 +38,7 @@
{% endblock %}
{% block extrahead %}
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/py.png', 1) }}" />
+ <link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html" />
{% if builder != "htmlhelp" %}
{% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
{% if versionswitcher is defined and not embedded %}<script type="text/javascript" src="{{ pathto('_static/version_switch.js', 1) }}"></script>{% endif %}