]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118689: Doc: fix ePub build (#118690)
authorInada Naoki <songofacandy@gmail.com>
Fri, 10 May 2024 10:24:02 +0000 (19:24 +0900)
committerGitHub <noreply@github.com>
Fri, 10 May 2024 10:24:02 +0000 (19:24 +0900)
Doc/conf.py
Doc/library/allos.rst
Doc/tools/extensions/glossary_search.py
Doc/tools/templates/layout.html

index 86371d17ae742a39de25f46e3529ebeb72b719dc..0e86de837d35d289df0087a1e921202599ac2d7a 100644 (file)
@@ -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
 # --------------------------------
 
index f7105d8af8e28b3d83588c09159fdb901a825f29..0223c1054ea5d86f5672935210e1863771bb8d9b 100644 (file)
@@ -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
index 59a6862ea3d3f46bf5f5a6f3bab38af751f4f4fd..232782093926f62058632fc06b5a050cac00ec73 100644 (file)
@@ -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 = {}
index 3c12b01b558f8396da96514ecf440dbbdcc8c584..e931147813ae03a8593bb119238f4257d8ddc126 100644 (file)
@@ -42,6 +42,7 @@
     </style>
 {{ super() }}
 
+{%- if not embedded %}
 <meta name="readthedocs-addons-api-version" content="1">
 <script type="text/javascript">
  function onSwitch(event) {
    }
  });
 </script>
+{%- endif %}
 {% endblock %}