From f8f77ed814a37bd437748215f08da8766be62b2e Mon Sep 17 00:00:00 2001 From: Jonathan Sick Date: Wed, 7 Jun 2023 11:11:04 -0400 Subject: [PATCH] Add sphinxcontrib-jquery to docs configs This ensures that jquery is available. Sphinx 6 stopped including jquery by default. This won't be needed once we adopt Pydata-Sphinx-Theme 0.13 and later, which includes jquery in its theme. --- CHANGELOG.md | 1 + pyproject.toml | 2 ++ src/documenteer/conf/guide.py | 1 + src/documenteer/conf/pipelines.py | 1 + 4 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c358977d..d53404e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Drop support for Python 3.7. - Drop support for Sphinx versions earlier than 5. - Temporarily pin pydata-sphinx-theme < 0.13 on account of a change in logo path checking (affects user guide projects). +- Use [sphinxcontrib-jquery](https://github.com/sphinx-contrib/jquery/) to ensure jQuery is available for user guide and Pipelines documentation builds. - Add a new `sphinx.exclude` field to `documenteer.toml` to list files for exclusion from a documentation project. More files and directories like `.venv` and `requirements.txt` are now excluded, as well. - New support for embedding OpenAPI documentation in a Redoc-generated subsite. The `documenteer.ext.openapi` extension can call a user-specified function to generate and install the OpenAPI specification the Sphinx source. For user guide projects, the `[project.openapi]` table in `documenteer.toml` can be used to configure both the `documenteer.ext.openapi` and `sphinxcontrib-redoc` extensions. [sphinxcontrib-redoc](https://sphinxcontrib-redoc.readthedocs.io/en/stable/) is installed and configured by default for all Rubin user guide projects (projects that use `documenteer.conf.guide`). diff --git a/pyproject.toml b/pyproject.toml index 5e3b6aa0..46257a65 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,7 @@ guide = [ "sphinxcontrib-mermaid", "sphinxext-opengraph", "sphinxcontrib-redoc", + "sphinxcontrib-jquery", ] technote = [ # Theme and extensions for technotes @@ -87,6 +88,7 @@ pipelines = [ "sphinx-prompt", "sphinxcontrib-doxylink", "sphinx-click", + "sphinxcontrib-jquery", ] [project.urls] diff --git a/src/documenteer/conf/guide.py b/src/documenteer/conf/guide.py index d914ea99..63ce1741 100644 --- a/src/documenteer/conf/guide.py +++ b/src/documenteer/conf/guide.py @@ -119,6 +119,7 @@ # ============================================================================ extensions = [ + "sphinxcontrib.jquery", "myst_parser", "sphinx_copybutton", "sphinx_design", diff --git a/src/documenteer/conf/pipelines.py b/src/documenteer/conf/pipelines.py index 89912670..02b8a647 100644 --- a/src/documenteer/conf/pipelines.py +++ b/src/documenteer/conf/pipelines.py @@ -118,6 +118,7 @@ print(f"Error getting sphinx-jinja version: {str(e)}") extensions = [ + "sphinxcontrib.jquery", "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.intersphinx",