Skip to content

Commit ad69169

Browse files
committed
Add sphinx docsearch extension
Load from env variables
1 parent 7ef3f98 commit ad69169

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/source/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@
4040
"sphinx_design",
4141
"sphinx_favicon",
4242
"sphinxcontrib.mermaid",
43-
# "nbsphinx",
44-
# "myst_parser",
4543
"myst_nb",
44+
"sphinx_docsearch",
4645
]
4746

47+
# The API key is a search-only key, so it is safe to expose in public repositories.
48+
# but some tools won't happy about having a "api_key" in the public repo,
49+
# so we load from the environment variable.
50+
docsearch_app_id = "MMXVFW6EQH"
51+
docsearch_api_key = os.environ.get("DOCSEARCH_API_KEY", "")
52+
docsearch_index_name = "evox"
53+
4854
autodoc2_packages = [
4955
"../../src/evox",
5056
]

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ docs = [
5959
"sphinx_copybutton",
6060
"sphinx_design",
6161
"sphinx-favicon",
62+
"sphinx-docsearch",
6263
"sphinxcontrib-mermaid",
6364
"polib",
6465
]

0 commit comments

Comments
 (0)