Docs: remove link elements in builders other than HTML (#133720)

Fixes epub build
This commit is contained in:
Maciej Olko
2025-05-14 16:03:07 +02:00
committed by GitHub
parent 9836503b48
commit 0afbd4e42a

View File

@@ -26,11 +26,11 @@
{% 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 %}