Skip to content

Commit 90dee35

Browse files
committed
feat: docs-linkcheck added for sphinx.mk
1 parent aff42b8 commit 90dee35

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.3.1 (unreleased)
4+
5+
- Features: Add `docs-linkcheck` to check for broken links in the sphinx documentation.
6+
37
## 1.3.0 (2025-09-03)
48

59
- Introduce testargs for pytest to have more control over the test and pass it args.

src/mxmake/topics/docs/sphinx.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#:description = Rebuild Sphinx documentation on changes, with live-reload in
1212
#: the browser using `sphinx-autobuild`.
1313
#:
14+
#:[target.docs-linkcheck]
15+
#:description = Run Sphinx linkcheck to verify external links in documentation.
16+
#:
1417
#:[target.docs-clean]
1518
#:description = Removes generated docs.
1619
#:
@@ -22,6 +25,10 @@
2225
#:description = Documentation generation target folder.
2326
#:default = docs/html
2427
#:
28+
#:[setting.DOCS_LINKCHECK_FOLDER]
29+
#:description = Documentation linkcheck output folder.
30+
#:default = docs/linkcheck
31+
#:
2532
#:[setting.DOCS_REQUIREMENTS]
2633
#:description = Documentation Python requirements to be installed (via pip).
2734
#:default =
@@ -52,6 +59,11 @@ docs-live: $(DOCS_TARGET) $(DOCS_TARGETS)
5259
@echo "Rebuild Sphinx documentation on changes, with live-reload in the browser"
5360
@$(SPHINX_AUTOBUILD_BIN) $(DOCS_SOURCE_FOLDER) $(DOCS_TARGET_FOLDER)
5461

62+
.PHONY: docs-linkcheck
63+
docs-linkcheck: $(DOCS_TARGET) $(DOCS_TARGETS)
64+
@echo "Run Sphinx linkcheck"
65+
@$(SPHINX_BIN) -b linkcheck $(DOCS_SOURCE_FOLDER) $(DOCS_LINKCHECK_FOLDER)
66+
5567
.PHONY: docs-dirty
5668
docs-dirty:
5769
@rm -f $(DOCS_TARGET)

0 commit comments

Comments
 (0)