]> granicus.if.org Git - python/commitdiff
Issue #26355: Specify canonical URLs in docs pages
authorNick Coghlan <ncoghlan@gmail.com>
Thu, 9 Feb 2017 15:03:59 +0000 (16:03 +0100)
committerNick Coghlan <ncoghlan@gmail.com>
Thu, 9 Feb 2017 15:03:59 +0000 (16:03 +0100)
Add canonical header link on each page to corresponding major
version of the documentation.

Patch by Matthias Bussonnier.

Doc/tools/templates/layout.html
Misc/ACKS
Misc/NEWS

index 5c180e7d01643acadddf2a9b7d50d4c8b7a07c87..640d8b304932990f15c7c69a3cd36a9ff09ad312 100644 (file)
@@ -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 %}
index 59b7704b73e354ec6e89c1f7b130b9480e817e84..3c169d6ef54778ef4af2dd6d1e6af21d1faf46aa 100644 (file)
--- 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
index 8419915c8ece96c3bf8bfd0194435c7ad02211ce..fa0e740836984f962fafad036efcc759662d3468 100644 (file)
--- 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.