Skip to content

Commit

Permalink
Issue python#26355: Specify canonical URLs in docs pages
Browse files Browse the repository at this point in the history
Add canonical header link on each page to corresponding major
version of the documentation.

Patch by Matthias Bussonnier.
  • Loading branch information
ncoghlan committed Feb 9, 2017
1 parent f592867 commit e662445
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Doc/tools/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ Alastair Burt
Tarn Weisner Burton
Lee Busby
Katherine Busch
Matthias Bussonnier
Ralph Butler
Laurent De Buyst
Zach Byrne
Expand Down
3 changes: 3 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down

0 comments on commit e662445

Please sign in to comment.