Skip to content

Commit 7ac933e

Browse files
authored
gh-118689: Doc: fix ePub build (#118690)
1 parent 7cc5e81 commit 7ac933e

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

Doc/conf.py

+4
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@
435435
epub_author = 'Python Documentation Authors'
436436
epub_publisher = 'Python Software Foundation'
437437

438+
# index pages are not valid xhtml
439+
# https://github.com/sphinx-doc/sphinx/issues/12359
440+
epub_use_index = False
441+
438442
# Options for the coverage checker
439443
# --------------------------------
440444

Doc/library/allos.rst

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ but they are available on most other systems as well. Here's an overview:
1616
io.rst
1717
time.rst
1818
argparse.rst
19-
getopt.rst
2019
logging.rst
2120
logging.config.rst
2221
logging.handlers.rst

Doc/tools/extensions/glossary_search.py

+1-1
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

+2
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)