From 00d7383018b8bc62182a877f6d5eef7384af9f64 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 30 Oct 2018 14:36:14 -0500 Subject: [PATCH] Add canonical tag to readthedocs theme (#1669) Close #1667 --- docs/about/release-notes.md | 1 + mkdocs/themes/readthedocs/base.html | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 207a9263..57575359 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -57,6 +57,7 @@ your global navigation uses more than one level, things will likely be broken. ### Other Changes and Additions to Version 1.1 * Bugfix: Do not normalize URL fragments (#1655). +* Add canonical tag to `readthedocs` theme (#1669). ## Version 1.0.4 (2018-09-07) diff --git a/mkdocs/themes/readthedocs/base.html b/mkdocs/themes/readthedocs/base.html index 519af02a..71606e52 100644 --- a/mkdocs/themes/readthedocs/base.html +++ b/mkdocs/themes/readthedocs/base.html @@ -8,6 +8,7 @@ {% if page and page.is_homepage %}{% endif %} {% if config.site_author %}{% endif %} + {% if page and page.canonical_url %}{% endif %} {% if config.site_favicon %} {% else %}{% endif %} {%- endblock %}