summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:03:59 +0100
committerNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:03:59 +0100
commit5e0114a832a903518c4af6983161c0c2a8942a24 (patch)
tree0ec0d4a3438f54b6145ae2cab473e9da55d6416e
parent42b9901193aabe4ec65738af5f88bfb0a47cd8d7 (diff)
downloadcpython-5e0114a832a903518c4af6983161c0c2a8942a24.tar.gz
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.
-rw-r--r--Doc/tools/templates/layout.html1
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
3 files changed, 5 insertions, 0 deletions
diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index 5c180e7d01..640d8b3049 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 %}
diff --git a/Misc/ACKS b/Misc/ACKS
index 59b7704b73..3c169d6ef5 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -218,6 +218,7 @@ Alastair Burt
Tarn Weisner Burton
Lee Busby
Katherine Busch
+Matthias Bussonnier
Ralph Butler
Laurent De Buyst
Zach Byrne
diff --git a/Misc/NEWS b/Misc/NEWS
index 8419915c8e..fa0e740836 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -70,6 +70,9 @@ C API
Documentation
-------------
+- Issue #26355: Add canonical header link on each page to corresponding major
+ version of the documentation. Patch by Matthias Bussonnier.
+
- Issue #29349: Fix Python 2 syntax in code for building the documentation.