Skip to content

Commit ba371eb

Browse files
link checkers for docs
1 parent 40277a0 commit ba371eb

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

.github/workflows/release-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
# - name: "Nox: MKDocs Build"
5858
# run: |
5959
# nox -s mkdocs_build
60+
# - name: "Nox: MKDocs Check Links"
61+
# run: |
62+
# nox -s mkdocs_checklinks
6063
# - name: "Save Artifacts - MkDocs"
6164
# uses: actions/upload-artifact@v4
6265
# with:

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,8 @@ jobs:
173173
- name: 'Nox: MKDocs Build'
174174
run: |
175175
nox -s mkdocs_build
176+
# Not checking the links in the pipeline right now.
177+
# This is throwing some false positives on intra-md links
178+
# that build OK, and would also be caught by our mkdocs
179+
# strict mode setting.
180+
# nox -s mkdocs_checklinks

noxfile.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ def mkdocs_build(session):
176176
session.run("mkdocs", "-v", "build", "--clean")
177177

178178

179+
@nox.session(python=_DEFAULT_PYTHON)
180+
def mkdocs_checklinks(session):
181+
"""Check links in the documentation"""
182+
session.install("-e", ".[docs]")
183+
session.run("mkdocs-linkcheck", "-v", "-r", "docs")
184+
185+
179186
@nox.session(python=_DEFAULT_PYTHON)
180187
def mkdocs_serve(session):
181188
"""Build the documentation and serve locally over HTTP. The server will watch for updates."""

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ docs = [
4949
"mkdocstrings[python] == 0.28.3",
5050
"mkdocs-click",
5151
"mkdocs-material == 9.6.12", # Upgrades may interact with docs/custom_theme
52-
"mkdocs-macros-plugin"
52+
"mkdocs-macros-plugin",
53+
"mkdocs-linkcheck",
54+
# "linkcheckmd",
5355
]
5456
examples = [
5557
"flask",

0 commit comments

Comments
 (0)