1313
1414import re
1515import sys
16+ import os
1617
1718sys.path.insert(0, "{{sphinx_docs_target}}")
1819
@@ -28,7 +29,7 @@ master_doc = "index"
2829# The short X.Y version
2930version = "{{version}}"
3031release = "{{release}}"
31-
32+ master_doc = "index"
3233
3334# -- General configuration ---------------------------------------------------
3435
@@ -72,6 +73,8 @@ source_suffix = {
7273 ".md": "myst-nb",
7374}
7475
76+ # If you want to mock imports during autodoc
77+ autodoc_mock_imports = [{{mock_imports}}]
7578
7679# -- Options for HTML output -------------------------------------------------
7780
@@ -101,8 +104,13 @@ html_theme_options = {
101104 "launch_buttons": {},
102105 "default_mode": "light",
103106 "switcher": False,
107+ "search_bar_text": "",
108+ "search_bar_position": "none",
104109}
105110
111+ # Prevents generation of searchindex.js
112+ html_search = False
113+
106114html_title = "{{html_title}}"
107115html_logo = "{{html_logo}}"
108116html_favicon = "{{html_favicon}}"
@@ -125,3 +133,12 @@ def copy_doc(src, dest, title=""):
125133 changed = True
126134 out.write(line)
127135{% endraw %}
136+
137+ # -- Post-build cleanup ------------------------------------------------------
138+ def remove_searchtools(app, exception):
139+ searchtools_path = os.path.join(app.outdir, '_static', 'searchtools.js')
140+ if os.path.exists(searchtools_path):
141+ os.remove(searchtools_path)
142+
143+ def setup(app):
144+ app.connect("build-finished", remove_searchtools)
0 commit comments