Skip to content

Commit

Permalink
➕ Add mkdocs-htmlproofer-plugin
Browse files Browse the repository at this point in the history
This plugin validates URLs, including anchors, in rendered html files.
To check for broken links locally:
    CHECK_BROKEN_LINKS=true mkdocs serve --quiet

See: https://github.com/manuzhang/mkdocs-htmlproofer-plugin
  • Loading branch information
ebouchut committed Nov 14, 2024
1 parent 082d072 commit 45c847b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ MKDOCS_EXPORTER_PDF=true mkdocs build
```

The PDF file is generated in`site/trio-docs.pdf`.


### Find Broken Links

To list broken links, we use [`mkdocs-htmlproofer-plugin`](https://github.com/manuzhang/mkdocs-htmlproofer-plugin):

```shell
CHECK_BROKEN_LINKS=true mkdocs build --quiet
```

## Contribute

You can contribute to the Trio documentation by correcting typos or suggesting new content.
Expand Down
5 changes: 4 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ site_name: TrioDocs
site_description: Documentation of Trio, an Automated Insulin Delivery system for iOS.
site_url: https://docs.diy-trio.org/
site_author: Trio Community
use_directory_urls: true
use_directory_urls: !ENV [CHECK_BROKEN_LINKS, True]

# GitHub Repository
repo_name: nightscout/trio-docs
Expand Down Expand Up @@ -86,6 +86,9 @@ plugins:
icon: material-file-download-outline
enabled: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.enabled
attributes: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.attributes
- htmlproofer:
enabled: !ENV [CHECK_BROKEN_LINKS, False]
raise_error_after_finish: true
- search

extra_css:
Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ mkdocs-exporter==6.1.1
mkdocs-material>=9.5.9
mkdocs-include-markdown-plugin>=6.0.4
mkdocs-exclude>=1.0.2
mkdocs-htmlproofer-plugin>=1.3.0
mkdocs-open-in-new-tab==1.0.6
mkdocs-macros-plugin>=1.0.4
23 changes: 12 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,44 @@ charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
ghp-import==2.1.0
greenlet==3.0.3
greenlet==3.1.1
hjson==3.1.0
idna==3.10
Jinja2==3.1.4
libsass==0.23.0
lxml==5.3.0
Markdown==3.7
MarkupSafe==3.0.1
MarkupSafe==3.0.2
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-exclude==1.0.2
mkdocs-exporter==6.1.1
mkdocs-get-deps==0.2.0
mkdocs-include-markdown-plugin==6.2.2
mkdocs-macros-plugin==1.3.5
mkdocs-material==9.5.40
mkdocs-htmlproofer-plugin==1.3.0
mkdocs-include-markdown-plugin==7.0.0
mkdocs-macros-plugin==1.3.7
mkdocs-material==9.5.44
mkdocs-material-extensions==1.3.1
mkdocs-open-in-new-tab==1.0.6
packaging==24.1
packaging==24.2
paginate==0.5.7
pathspec==0.12.1
platformdirs==4.3.6
playwright==1.47.0
playwright==1.48.0
pyee==12.0.0
Pygments==2.18.0
pymdown-extensions==10.11.2
pypdf==5.0.1
pymdown-extensions==10.12
pypdf==5.1.0
python-dateutil==2.9.0.post0
PyYAML==6.0.2
pyyaml_env_tag==0.1
regex==2024.9.11
regex==2024.11.6
requests==2.32.3
six==1.16.0
soupsieve==2.6
super_collections==0.5.3
termcolor==2.5.0
typing_extensions==4.12.2
urllib3==2.2.3
watchdog==5.0.3
watchdog==6.0.0
wcmatch==10.0

0 comments on commit 45c847b

Please sign in to comment.