Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

➕ Add mkdocs-htmlproofer-plugin to check for broken links #101

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions docs/operate/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ If you build Trio on your Mac using Xcode, the recommendation is to use the [**T

### Build Trio with Script

The **`TrioBuildSelectScript`** is similar to the script used to build Loop. If you need it, extensive instructions for that script are provided at these links: [LoopDocs: Build Select Script](https://loopkit.github.io/loopdocs/build/step14/#build-select-script) and [Loop and Learn: Build Select Script](https://www.loopandlearn.org/build-select/).
The **`TrioBuildSelectScript`** is similar to the script used to build Loop. If you need it, extensive instructions for that script are provided at these links: [LoopDocs: Build Select Script](https://loopkit.github.io/loopdocs/build/build-app/#build-select-script) and [Loop and Learn: Build Select Script](https://www.loopandlearn.org/build-select/).

The **`TrioBuildSelectScript`** offers the choice to:

Expand Down Expand Up @@ -198,7 +198,7 @@ For more information, refer to [Loop and Learn: Maintenance Utitilites](https://

### Build Errors

If you encounter any build issues, please look at the [LoopDocs Build](https://loopkit.github.io/loopdocs/build/build_errors/) errors page. Only some things on that page are relevant for building Trio, but many potential issues will likely be covered there. You will also get helpful advice about what info to provide if you need to ask for help. When you have identified the error message(s), you can use the search tool in LoopDocs to see if your error is mentioned.
If you encounter any build issues, please look at the [LoopDocs Build](https://loopkit.github.io/loopdocs/build/build-errors/) errors page. Only some things on that page are relevant for building Trio, but many potential issues will likely be covered there. You will also get helpful advice about what info to provide if you need to ask for help. When you have identified the error message(s), you can use the search tool in LoopDocs to see if your error is mentioned.

If you need it, you are most likely to get help in one of these groups:

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