]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Docs: remove link elements in builders other than HTML (GH-133720) (#134007)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 14 May 2025 15:23:12 +0000 (17:23 +0200)
committerGitHub <noreply@github.com>
Wed, 14 May 2025 15:23:12 +0000 (18:23 +0300)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Doc/tools/templates/layout.html

index 56023ebf9627036528fa82ff9862663fe99c7d49..1cb0200822d9fe02298ec608c92c000bc285f9f1 100644 (file)
 {% endblock %}
 
 {% block extrahead %}
-    {% if builder == "html" and enable_analytics %}
+    {% if builder == "html" %}
+      {% if enable_analytics %}
       <script defer data-domain="docs.python.org" src="https://analytics.python.org/js/script.outbound-links.js"></script>
-    {% endif %}
-    <link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html">
-    {% if builder != "htmlhelp" %}
+      {% endif %}
+      <link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html">
       {% if pagename == 'whatsnew/changelog' and not embedded %}
       <script type="text/javascript" src="{{ pathto('_static/changelog_search.js', 1) }}"></script>{% endif %}
     {% endif %}