summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-10 10:40:35 (GMT)
committerGitHub <noreply@github.com>2024-05-10 10:40:35 (GMT)
commit760b3f08dc9932d1595982b527c3bd187681ff49 (patch)
treea3fa954a3bfafd8b208a6d757e61b695fbdd7967
parentd524802e9dd624f569948c4c0b6adbe000edcffe (diff)
downloadcpython-760b3f08dc9932d1595982b527c3bd187681ff49.zip
cpython-760b3f08dc9932d1595982b527c3bd187681ff49.tar.gz
cpython-760b3f08dc9932d1595982b527c3bd187681ff49.tar.bz2
gh-118689: Doc: fix ePub build (GH-118690)
(cherry picked from commit 7ac933e2609b2ef9b08ccf9c815b682b0e1ede2a) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
-rw-r--r--Doc/conf.py4
-rw-r--r--Doc/library/allos.rst1
-rw-r--r--Doc/tools/extensions/glossary_search.py2
-rw-r--r--Doc/tools/templates/layout.html2
4 files changed, 7 insertions, 2 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index 86371d1..0e86de8 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -435,6 +435,10 @@ latex_appendices = ['glossary', 'about', 'license', 'copyright']
epub_author = 'Python Documentation Authors'
epub_publisher = 'Python Software Foundation'
+# index pages are not valid xhtml
+# https://github.com/sphinx-doc/sphinx/issues/12359
+epub_use_index = False
+
# Options for the coverage checker
# --------------------------------
diff --git a/Doc/library/allos.rst b/Doc/library/allos.rst
index f7105d8..0223c10 100644
--- a/Doc/library/allos.rst
+++ b/Doc/library/allos.rst
@@ -16,7 +16,6 @@ but they are available on most other systems as well. Here's an overview:
io.rst
time.rst
argparse.rst
- getopt.rst
logging.rst
logging.config.rst
logging.handlers.rst
diff --git a/Doc/tools/extensions/glossary_search.py b/Doc/tools/extensions/glossary_search.py
index 59a6862..2327820 100644
--- a/Doc/tools/extensions/glossary_search.py
+++ b/Doc/tools/extensions/glossary_search.py
@@ -20,7 +20,7 @@ JSON = 'glossary.json'
def process_glossary_nodes(app, doctree, fromdocname):
- if app.builder.format != 'html':
+ if app.builder.format != 'html' or app.builder.embedded:
return
terms = {}
diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index 3c12b01..e931147 100644
--- a/Doc/tools/templates/layout.html
+++ b/Doc/tools/templates/layout.html
@@ -42,6 +42,7 @@
</style>
{{ super() }}
+{%- if not embedded %}
<meta name="readthedocs-addons-api-version" content="1">
<script type="text/javascript">
function onSwitch(event) {
@@ -127,4 +128,5 @@
}
});
</script>
+{%- endif %}
{% endblock %}