Skip to content

Commit 1a9162e

Browse files
committed
Infra: Add intersphinx support for Python docs and PyPUG
1 parent 3f50ab6 commit 1a9162e

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

conf.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Add 'include_patterns' as a config variable
1212
from sphinx.config import Config
13-
Config.config_values['include_patterns'] = [], 'env', []
13+
Config.config_values["include_patterns"] = [], "env", []
1414
del Config
1515

1616
# -- Project information -----------------------------------------------------
@@ -21,7 +21,11 @@
2121
# -- General configuration ---------------------------------------------------
2222

2323
# Add any Sphinx extension module names here, as strings.
24-
extensions = ["pep_sphinx_extensions", "sphinx.ext.githubpages"]
24+
extensions = [
25+
"pep_sphinx_extensions",
26+
"sphinx.ext.intersphinx",
27+
"sphinx.ext.githubpages",
28+
]
2529

2630
# The file extensions of source files. Sphinx uses these suffixes as sources.
2731
source_suffix = {
@@ -46,6 +50,13 @@
4650
"pep-0012/pep-NNNN.rst",
4751
]
4852

53+
# Intersphinx configuration
54+
intersphinx_mapping = {
55+
'python': ('https://docs.python.org/3/', None),
56+
'packaging': ('https://packaging.python.org/en/latest/', None),
57+
}
58+
intersphinx_disabled_reftypes = []
59+
4960
# -- Options for HTML output -------------------------------------------------
5061

5162
# HTML output settings
@@ -60,4 +71,4 @@
6071
html_baseurl = "https://peps.python.org" # to create the CNAME file
6172
gettext_auto_build = False # speed-ups
6273

63-
templates_path = ['pep_sphinx_extensions/pep_theme/templates'] # Theme template relative paths from `confdir`
74+
templates_path = ["pep_sphinx_extensions/pep_theme/templates"] # Theme template relative paths from `confdir`

0 commit comments

Comments
 (0)