10000 gh-118689: Doc: fix ePub build (GH-118690) · python/cpython@9f8f14a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f8f14a

Browse files
gh-118689: Doc: fix ePub build (GH-118690)
(cherry picked from commit 7ac933e) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
1 parent 8bfaf3a commit 9f8f14a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@
419419
epub_author = 'Python Documentation Authors'
420420
epub_publisher = 'Python Software Foundation'
421421

422+
# index pages are not valid xhtml
423+
# https://github.com/sphinx-doc/sphinx/issues/12359
424+
epub_use_index = False
425+
422426
# Options for the coverage checker
423427
# --------------------------------
424428

Doc/tools/extensions/glossary_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
def process_glossary_nodes(app, doctree, fromdocname):
23-
if app.builder.format != 'html':
23+
if app.builder.format != 'html' or app.builder.embedded:
2424
return
2525

2626
terms = {}

Doc/tools/templates/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
</style>
4343
{{ super() }}
4444

45+
{%- if not embedded %}
4546
<meta name="readthedocs-addons-api-version" content="1">
4647
<script type="text/javascript">
4748
function onSwitch(event) {
@@ -127,4 +128,5 @@
127128
}
128129
});
129130
</script>
131+
{%- endif %}
130132
{% endblock %}

0 commit comments

Comments
 (0)
0