mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Doc] Make Sphinx search work when hosting docs locally
The javascript for the search box wouldn't work due to an earlier error in the javascript for the version switcher when the switcher JSON file couldn't be loaded.
This commit is contained in:
@@ -54,10 +54,14 @@ if localenv['sphinx_docs']:
|
||||
"#CONTRIBUTING.md",
|
||||
Copy("$TARGET", "$SOURCE"))
|
||||
|
||||
copy_switcher = localenv.Command("#build/doc/html/dev/_static/doc-versions.json",
|
||||
"sphinx/_static/doc-versions.json",
|
||||
Copy("$TARGET", "$SOURCE"))
|
||||
|
||||
sphinxdocs = build(localenv.Command('#build/doc/html/index.html',
|
||||
'sphinx/conf.py', build_sphinx))
|
||||
env.Alias('sphinx', sphinxdocs)
|
||||
env.Depends(sphinxdocs, [copy_sphinx, copy_contrib])
|
||||
env.Depends(sphinxdocs, [copy_sphinx, copy_contrib, copy_switcher])
|
||||
env.Depends(sphinxdocs, [copy_python_samples, copy_matlab_ex_samples])
|
||||
env.Depends(sphinxdocs, env['python_module'])
|
||||
|
||||
|
||||
@@ -325,7 +325,6 @@ html_theme_options = {
|
||||
"primary_sidebar_end": ["numfocus"],
|
||||
"switcher": {
|
||||
"json_url": "/dev/_static/doc-versions.json",
|
||||
# "json_url": "https://cantera.org/doc-versions.json",
|
||||
"version_match": version,
|
||||
},
|
||||
"check_switcher": False,
|
||||
|
||||
Reference in New Issue
Block a user