diff --git a/docs/source/conf.py b/docs/source/conf.py index f26770ed5..63c5d7e28 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,6 +14,8 @@ import shutil from datetime import datetime, timezone +from intersphinx_registry import get_intersphinx_mapping + HERE = os.path.dirname(__file__) # If extensions (or modules to document with autodoc) are in another directory, @@ -317,11 +319,7 @@ # texinfo_no_detailmenu = False # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = { - "python": ("https://docs.python.org/3.6", None), - "jinja": ("http://jinja.pocoo.org/docs", None), - "nbformat": ("https://nbformat.readthedocs.io/en/latest", None), -} +intersphinx_mapping = get_intersphinx_mapping(packages={"python", "jinja", "nbformat"}) def setup(_): diff --git a/pyproject.toml b/pyproject.toml index f7a3f53e9..c2252e050 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,7 @@ docs = [ "ipython", "ipykernel", "sphinxcontrib_spelling", + "intersphinx_registry", ] all = ["nbconvert[qtpdf,webpdf,test,serve,docs]"]