Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90c86ff

Browse files
tacaswellMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #13592: DOC: Make canonical URLs point to versioned path.
1 parent 3218077 commit 90c86ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/_templates/layout.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ <h3>{{ _('Navigation') }}</h3>
162162
{%- endif %}
163163
{%- endblock %}
164164
{%- block extrahead %}
165-
<link rel="canonical" href="https://matplotlib.org/{{pagename}}.html" />
165+
{%- if '+' in release %}
166+
<link rel="canonical" href="https://matplotlib.org/devdocs/{{pagename}}.html" />
167+
{%- else %}
168+
<link rel="canonical" href="https://matplotlib.org/{{version}}/{{pagename}}.html" />
169+
{%- endif %}
166170
{% endblock %}
167171

168172

0 commit comments

Comments
 (0)