Skip to content

Commit 9e4226b

Browse files
committed
doc: add linkcheck build target
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent d1fe8a4 commit 9e4226b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

doc/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ ifneq ($(builddoc),p)
8989
$(SOURCE_DIR)/version.py: $(SOURCE_DIR)/version.py.in ../version.inc
9090
$(translate-in-script)
9191

92+
linkcheck: $(SOURCE_DIR)/version.py
93+
$(SPHINXBUILD) $(SPHINXOPTS) -b linkcheck "$(SOURCE_DIR)" "$(BUILD_DIR)"
94+
9295
$(BUILD_DIR)/%.html: $(SOURCE_DIR)/%.rst $(SOURCE_DIR)/version.py
9396
$(ECHO_GEN2) $(ECHO_DIR_PREFIX)$(BUILD_DIR)/*.html
9497
$(SPHINXBUILD) $(SPHINXOPTS) -b html "$(SOURCE_DIR)" "$(BUILD_DIR)"

doc/source/conf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,18 @@ def get_version_release_from_git():
318318
]
319319

320320

321+
# -- Options for linkcheck ------------------------------------------------
322+
323+
linkcheck_ignore = [
324+
'https://matrix.to/#',
325+
'module.html#version-specifiers',
326+
'tag:S,F',
327+
'tag:sticky',
328+
]
329+
linkcheck_timeout = 5
330+
linkcheck_workers = 1
331+
332+
321333
# -- Extension interface --------------------------------------------------
322334

323335
from sphinx import addnodes

0 commit comments

Comments
 (0)