]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: remove link elements in builders other than HTML (#133720)
authorMaciej Olko <maciej.olko@affirm.com>
Wed, 14 May 2025 14:03:07 +0000 (16:03 +0200)
committerGitHub <noreply@github.com>
Wed, 14 May 2025 14:03:07 +0000 (10:03 -0400)
Fixes epub build

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 %}