Skip to content

Commit 0afbd4e

Browse files
authored
Docs: remove link elements in builders other than HTML (#133720)
Fixes epub build
1 parent 9836503 commit 0afbd4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/tools/templates/layout.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
{% endblock %}
2727

2828
{% block extrahead %}
29-
{% if builder == "html" and enable_analytics %}
29+
{% if builder == "html" %}
30+
{% if enable_analytics %}
3031
<script defer data-domain="docs.python.org" src="https://analytics.python.org/js/script.outbound-links.js"></script>
31-
{% endif %}
32-
<link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html">
33-
{% if builder != "htmlhelp" %}
32+
{% endif %}
33+
<link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html">
3434
{% if pagename == 'whatsnew/changelog' and not embedded %}
3535
<script type="text/javascript" src="{{ pathto('_static/changelog_search.js', 1) }}"></script>{% endif %}
3636
{% endif %}

0 commit comments

Comments
 (0)