Skip to content

Commit 4d6de11

Browse files
authored
Add a call to add_js_files (sphinxcontrib.query) (#1448)
* Add a call to add_js_files since it doesn't happen when loading extension from theme sphinx-contrib/jquery#23 * Avoid importing from sphinxcontrib.jquery in __init__ * Add reference to issue
1 parent 03a86b8 commit 4d6de11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sphinx_rtd_theme/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ def setup(app):
5858
# enabled at most once.
5959
# See: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.setup_extension
6060
app.setup_extension("sphinxcontrib.jquery")
61+
# However, we need to call the extension's callback since setup_extension doesn't do it
62+
# See: https://github.com/sphinx-contrib/jquery/issues/23
63+
from sphinxcontrib.jquery import add_js_files as jquery_add_js_files
64+
jquery_add_js_files(app, app.config)
6165

6266
# Register the theme that can be referenced without adding a theme path
6367
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))

0 commit comments

Comments
 (0)