Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit edc0632

Browse filesBrowse files
authored
Merge pull request #13594 from meeseeksmachine/auto-backport-of-pr-13592-on-v3.1.x
Backport PR #13592 on branch v3.1.x (DOC: Make canonical URLs point to versioned path.)
2 parents 3218077 + 90c86ff commit edc0632
Copy full SHA for edc0632

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎doc/_templates/layout.html

Copy file name to clipboardExpand all lines: doc/_templates/layout.html
+5-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.