Skip to content

Commit a7f8725

Browse files
committed
Add build option to skip intersphinx locally, add pixi to .gitignore
Skipping intersphinx helps when you build in locked-down containers, that can't reach out to the dozen (or 100+?) locations that intersphinx wants to access. And when you're working on a single page, you locally just want to check how it renders, and usually don't need intersphinx anyway. Also add the default Pixi content to .gitignore, useful when that's your preferred (or only available) build tool rather than invoking `nox` directly.
1 parent 44c9aac commit a7f8725

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ build/
55
__pycache__
66
.DS_Store
77
/locales/
8+
9+
# pixi environments
10+
.pixi/*
11+
!.pixi/config.toml

‎source/conf.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@
248248
"virtualenv": ("https://virtualenv.pypa.io/en/stable/", None),
249249
}
250250

251+
# Local builds can skip external inventories when network access is restricted.
252+
# Sphinx injects `tags` when loading this configuration.
253+
if tags.has("skip-intersphinx"): # noqa: F821
254+
intersphinx_mapping = {}
255+
suppress_warnings = ["ref.*"]
256+
251257
# -- Options for todo extension --------------------------------------------------------
252258
# https://www.sphinx-doc.org/en/master/usage/extensions/todo.html#configuration
253259

0 commit comments

Comments
 (0)