Skip to content

Commit b29cacb

Browse files
committed
Remove link elements in builders other than html
This change fixes EPUBs
1 parent c492ac7 commit b29cacb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/tools/templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{% if builder == "html" and enable_analytics %}
3030
<script defer data-domain="docs.python.org" src="https://analytics.python.org/js/script.outbound-links.js"></script>
3131
{% endif %}
32-
<link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html">
32+
{% if builder == "html" %}<link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html">{% endif %}
3333
{% if builder != "htmlhelp" %}
3434
{% if pagename == 'whatsnew/changelog' and not embedded %}
3535
<script type="text/javascript" src="{{ pathto('_static/changelog_search.js', 1) }}"></script>{% endif %}

0 commit comments

Comments
 (0)