Skip to content

Commit

Permalink
Add link checker
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymilne committed May 13, 2024
1 parent e135370 commit 9b7a0aa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vizro-ai/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ build:
python: "3.11"
commands:
- pip install hatch
- cd vizro-ai/ && hatch run docs:mkdocs build --strict
- cd vizro-ai/ && hatch run docs:build && hatch run docs:link-check
- mkdir --parents $READTHEDOCS_OUTPUT
- mv vizro-ai/site/ $READTHEDOCS_OUTPUT/html
8 changes: 7 additions & 1 deletion vizro-ai/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ dependencies = [
"mkdocstrings[python]"
]
detached = true
scripts = {serve = "mkdocs serve --strict"}

[envs.docs.scripts]
serve = "mkdocs serve --strict"
build = "mkdocs build --strict"
# Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify
# more advanced settings using a linkcheckerrc config file.
link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1"

[envs.lint]
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion vizro-core/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ build:
python: "3.11"
commands:
- pip install hatch
- cd vizro-core/ && hatch run docs:mkdocs build --strict
- cd vizro-ai/ && hatch run docs:build && hatch run docs:link-check
- mkdir --parents $READTHEDOCS_OUTPUT
- mv vizro-core/site/ $READTHEDOCS_OUTPUT/html
8 changes: 7 additions & 1 deletion vizro-core/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ dependencies = [
"mkdocstrings[python]"
]
detached = true
scripts = {serve = "mkdocs serve --strict"}

[envs.docs.scripts]
serve = "mkdocs serve --strict"
build = "mkdocs build --strict"
# Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify
# more advanced settings using a linkcheckerrc config file.
link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1"

[envs.lint]
dependencies = [
Expand Down

0 comments on commit 9b7a0aa

Please sign in to comment.