Skip to content

Commit 22c7e83

Browse files
authored
Merge pull request #52 from mxstack/feature/docs-linkcheck
feat: docs-linkcheck added for sphinx.mk
2 parents 8b4f8e7 + c363824 commit 22c7e83

File tree

6 files changed

+32
-6
lines changed

6 files changed

+32
-6
lines changed

CHANGES.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
## 1.3.1 (unreleased)
44

5-
- Fix theme for newer Sphinx 7.x.
6-
- Add support for Python 3.14.
7-
- Fix interactive uv venv, use --allow-existing instead.
5+
- Fix: theme for newer Sphinx 7.x.
6+
- Fix: interactive uv venv, use --allow-existing instead.
7+
- Feature: Add support for Python 3.14.
8+
- Feature: Add `docs-linkcheck` to check for broken links in the sphinx documentation.
89

910
## 1.3.0 (2025-09-03)
1011

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The detailed `mxmake` documentation is available [mxstack.github.io/mxmake](http
1818

1919
# Copyright
2020

21-
- Copyright (c) 2022-2024 mxstack Contributors
21+
- Copyright (c) 2022-2025 mxstack Contributors
2222
- BSD 2-clause license (see below)
2323

2424
Contributors

docs/source/conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,16 @@
7777

7878
# Logo configuration
7979
html_logo = "_static/mxmake-logo.svg"
80+
81+
# -- Options for linkcheck builder -------------------------------------------
82+
83+
# Ignore localhost URLs (they're examples, not real links to check)
84+
# Also ignore links that linkcheck has issues with but are actually valid
85+
linkcheck_ignore = [
86+
r"http://localhost:\d+",
87+
r"https://gist\.github\.com/.*#.*", # GitHub gist anchors cause false positives
88+
r"https://www\.gnu\.org/.*", # gnu.org frequently times out but links are valid
89+
]
90+
91+
# Increase timeout for slow sites
92+
linkcheck_timeout = 60

docs/source/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Source Code
44

5-
The sources are in a GIT DVCS with its main branches at [Github](http://github.com/mxstack/mxmake).
5+
The sources are in a GIT DVCS with its main branches at [Github](https://github.com/mxstack/mxmake).
66

77
## Copyright & Licence
88

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "mxmake"
33
description = "Generates a Python project-specific Makefile by using an extensible library of configurable Makefile snippets."
4-
version = "1.3.0"
4+
version = "1.4.0"
55
keywords = ["development", "deployment", "make"]
66
authors = [
77
{name = "MX Stack Developers", email = "dev@bluedynamics.com" }

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)