diff --git a/docs/Makefile b/docs/Makefile index f5b3ef705..57fada28e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -60,7 +60,6 @@ html: rm -rf $(BUILDDIR)/html/_images #rm -rf _build/doctrees/ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - python fix_search.py touch $(BUILDDIR)/html/.nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/docs/conf.py b/docs/conf.py index 070dfb538..706267aaf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -77,6 +77,7 @@ "sphinx.ext.napoleon", "sphinx.ext.linkcode", "sphinx.ext.extlinks", + "sphinxcontrib.jquery", # Needed by sphinx_rtd_theme # Custom "sphinx_copybutton", ] diff --git a/docs/fix_search.py b/docs/fix_search.py deleted file mode 100644 index 1c7d84e0b..000000000 --- a/docs/fix_search.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -A temporary fix for #953 while waiting for upstream sphinx_rtd_theme to fix/remove their -dependency on jQuery. -""" - -from pathlib import Path -import re - -search_html = Path("./_build/html/search.html") -assert search_html.exists() - -with open(search_html) as fp: - html = fp.read() - -pat = r"(' -html_fixed = re.sub(pat, repl, html) - -with open(search_html, "w") as fp: - fp.write(html_fixed) diff --git a/pyproject.toml b/pyproject.toml index df605c747..20f646736 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ sqlalchemy = { version = "^2.0", optional = true } [tool.poetry.extras] apps = ["sqlalchemy"] dev = ["asv", "black", "codespell", "coverage", "mypy", "pyfakefs", "pytest", "pytest-cov", "ruff", "sqlalchemy"] -docs = ["numpydoc", "sphinx", "sphinx-copybutton", "sphinx-rtd-theme"] +docs = ["numpydoc", "sphinx", "sphinx-copybutton", "sphinx-rtd-theme", "sphinxcontrib-jquery"] tests = ["coverage", "pyfakefs", "pytest", "pytest-cov", "sqlalchemy"] [tool.poetry.scripts]