diff --git a/docs/conf.py b/docs/conf.py index b7766a70..614fed71 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,7 @@ # import os import sys +from intersphinx_registry import get_intersphinx_mapping try: from ipympl import __version__ as release @@ -50,12 +51,9 @@ nitpicky = True # warn if cross-references are missing # Intersphinx settings -intersphinx_mapping = { - "ipywidgets": ("https://ipywidgets.readthedocs.io/en/stable", None), - "matplotlib": ("https://matplotlib.org/stable", None), - "numpy": ("https://numpy.org/doc/stable", None), - "python": ("https://docs.python.org/3", None), -} +intersphinx_mapping = get_intersphinx_mapping( + packages={"ipywidgets", "matplotlib", "numpy", "python"} +) # Settings for copybutton diff --git a/pyproject.toml b/pyproject.toml index 760cb113..e506215a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,7 @@ docs = [ "sphinx-copybutton", "sphinx-thebe", "sphinx-togglebutton", + "intersphinx_registry", ] [project.urls]