Skip to content

Commit 2bea511

Browse files
committed
intersphinx mapping
1 parent f0d813d commit 2bea511

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/sphinx/source/conf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,28 @@
5757
'sphinx_toggleprompt',
5858
'sphinx_favicon',
5959
'hoverxref.extension',
60+
'sphinx.ext.intersphinx',
6061
]
6162

6263
mathjax3_config = {'chtml': {'displayAlign': 'left',
6364
'displayIndent': '2em'}}
6465

66+
# used with hoverxref to link to other projects' documentation not hosted by
67+
# readthedocs
68+
intersphinx_mapping = {
69+
"python": ("https://docs.python.org/3/", None),
70+
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
71+
"numpy": ("https://numpy.org/doc/stable", None),
72+
"scipy": ("https://docs.scipy.org/doc/scipy", None),
73+
"matplotlib": ("https://matplotlib.org/stable/", None),
74+
}
75+
6576
# Enable hover tooltips
6677
hoverxref_auto_ref = True
6778
hoverxref_roles = ["class", "meth", "func", "ref", "term"]
6879
hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip")
6980
hoverxref_domains = ["py"]
81+
hoverxref_intersphinx = list(intersphinx_mapping.keys())
7082

7183
napoleon_use_rtype = False # group rtype on same line together with return
7284

0 commit comments

Comments
 (0)