sphinxcontrib-jquery
sphinxcontrib-jquery is a Sphinx extension that provides jQuery for Sphinx projects running on versions 1.6 through 4.0. It was created to bridge a period where Sphinx core temporarily removed jQuery, ensuring compatibility for projects relying on it. The current version is 4.1.
Warnings
- breaking Using `sphinxcontrib-jquery` with Sphinx versions 5.0 and newer will cause conflicts or be redundant. From Sphinx 5.0 onwards, jQuery is re-bundled into Sphinx core, making this extension unnecessary and potentially problematic.
- gotcha This extension is specifically designed for Sphinx versions between 1.6 and 4.0 (inclusive). Using it outside this range (e.g., with very old Sphinx versions < 1.6) may lead to unexpected behavior, errors, or a lack of desired functionality.
Install
-
pip install sphinxcontrib-jquery
Quickstart
# conf.py
# To enable the extension, add 'sphinxcontrib.jquery' to the extensions list
# in your Sphinx project's conf.py file.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinxcontrib.jquery', # <--- Add this line
# ... other extensions
]