mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
docs: Support building documentation locally
Building the documentation locally without Internet access will fail, because sphinx will try to download the intersphinx inventory from http://docs.python.org/3/objects.inv. Support building the documentation locally without Internet access by searching for locally installed intersphinx inventory first. Bug-Debian: https://bugs.debian.org/755026 Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
This commit is contained in:
parent
23bbc4594c
commit
f2201bb260
1 changed files with 12 additions and 1 deletions
13
doc/conf.py
13
doc/conf.py
|
@ -33,7 +33,18 @@ import salt.version # isort:skip
|
|||
formulas_dir = os.path.join(os.pardir, docs_basepath, "formulas")
|
||||
|
||||
# ----- Intersphinx Settings ------------------------------------------------>
|
||||
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
|
||||
intersphinx_mapping = {
|
||||
"python": (
|
||||
"https://docs.python.org/3",
|
||||
(
|
||||
"/usr/share/doc/python{}.{}/html/objects.inv".format(
|
||||
sys.version_info[0], sys.version_info[1]
|
||||
),
|
||||
"/usr/share/doc/python/html/objects.inv",
|
||||
None,
|
||||
),
|
||||
)
|
||||
}
|
||||
# <---- Intersphinx Settings -------------------------------------------------
|
||||
|
||||
# -- General Configuration -----------------------------------------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue