Skip to content

Commit

Permalink
Add a call to add_js_files since it doesn't happen when loading exten…
Browse files Browse the repository at this point in the history
…sion from theme sphinx-contrib/jquery#23
  • Loading branch information
benjaoming committed Mar 20, 2023
1 parent ee64d37 commit 7efbdc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sphinx_rtd_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from sphinx import version_info as sphinx_version
from sphinx.locale import _
from sphinx.util.logging import getLogger
from sphinxcontrib.jquery import add_js_files as jquery_add_js_files


__version__ = '1.2.1alpha1'
Expand Down Expand Up @@ -58,6 +59,8 @@ def setup(app):
# enabled at most once.
# See: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.setup_extension
app.setup_extension("sphinxcontrib.jquery")
# However, we need to call the extension's callback since setup_extension doesn't do it
jquery_add_js_files(app, app.config)

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

0 comments on commit 7efbdc5

Please sign in to comment.