diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-10 12:34:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 19:34:33 +0900 |
commit | 9f8f14a6daebc6e22bc1c787699157a478ea94fb (patch) | |
tree | a9965bf10fab101bb3f83d52adad4d7b20b62d6b | |
parent | 8bfaf3a5f0f876c8b91db892d6cae651ae03b627 (diff) | |
download | cpython3-9f8f14a6daebc6e22bc1c787699157a478ea94fb.tar.gz |
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.py | 4 | ||||
-rw-r--r-- | Doc/tools/extensions/glossary_search.py | 2 | ||||
-rw-r--r-- | Doc/tools/templates/layout.html | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Doc/conf.py b/Doc/conf.py index 784d84ca87..74b6c9d411 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -419,6 +419,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/tools/extensions/glossary_search.py b/Doc/tools/extensions/glossary_search.py index 59a6862ea3..2327820939 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 3c12b01b55..e931147813 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 %} |