Skip to content

Commit

Permalink
gh-118689: Doc: fix ePub build (GH-118690)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7ac933e)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
  • Loading branch information
miss-islington and methane committed May 10, 2024
1 parent 8bfaf3a commit 9f8f14a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@
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
# --------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Doc/tools/extensions/glossary_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


def process_glossary_nodes(app, doctree, fromdocname):
if app.builder.format != 'html':
if app.builder.format != 'html' or app.builder.embedded:
return

terms = {}
Expand Down
2 changes: 2 additions & 0 deletions Doc/tools/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
</style>
{{ super() }}

{%- if not embedded %}
<meta name="readthedocs-addons-api-version" content="1">
<script type="text/javascript">
function onSwitch(event) {
Expand Down Expand Up @@ -127,4 +128,5 @@
}
});
</script>
{%- endif %}
{% endblock %}

0 comments on commit 9f8f14a

Please sign in to comment.