Skip to content

Commit 2e2b89f

Browse files
authored
added htmlproofer
1 parent d4ae83e commit 2e2b89f

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

.github/workflows/mkdocs-gh-pages.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
GH_C17_DEV_TOKEN: ${{ secrets.GH_C17_DEV_TOKEN }}
15+
ENABLED_HTMLPROOFER: ${{ vars.ENABLED_HTMLPROOFER || 'False' }}
1516
steps:
1617
- name: Checkout reflect-cpp repo
1718
uses: actions/checkout@v4

docs/docs-readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ hide:
88

99
## The basics
1010

11-
<!-- [Structs](concepts/structs.md) - Recaps the motivating example in the README. A struct is the equivalent of an AND statement or a product type in type theory. -->
11+
[Structs](concepts/structs.md) - Recaps the motivating example in the README. A struct is the equivalent of an AND statement or a product type in type theory.
1212

1313
[Optional fields](optional_fields.md) - For defining fields in your serialized format that might be absent in some cases.
1414

1515
[Struct flattening](flatten_structs.md) - For making struct A "inherit" the fields of struct B.
1616

17-
<!-- [Processors](concepts/processors.md) - For modifying the structs before serialization and deserialization. For instance, processors can be used to transform all field names from `snake_case` to `camelCase`. -->
17+
[Processors](concepts/processors.md) - For modifying the structs before serialization and deserialization. For instance, processors can be used to transform all field names from `snake_case` to `camelCase`.
1818

19-
<!-- [The rfl::Field-syntax](concepts/field_syntax.md) - Describes an alternative syntax which requires slightly more effort, but allows for some powerful functionalities. -->
19+
[The rfl::Field-syntax](concepts/field_syntax.md) - Describes an alternative syntax which requires slightly more effort, but allows for some powerful functionalities.
2020

2121
[String literals](literals.md) - For representing strings that can only assume a limited number of enumerated values.
2222

@@ -62,7 +62,7 @@ hide:
6262

6363
## Custom classes
6464

65-
<!-- [Custom classes](concepts/custom_classes.md) - For custom classes with private fields. -->
65+
[Custom classes](concepts/custom_classes.md) - For custom classes with private fields.
6666

6767
[Custom parsers for your classes](custom_parser.md) - For custom classes with private fields that you want to leave absolutely untouched.
6868

@@ -98,7 +98,7 @@ hide:
9898

9999
## Advanced topics
100100

101-
<!-- [Supporting your own format](supported_formats/supporting_your_own_format.md) - For supporting your own serialization and deserialization formats. -->
101+
[Supporting your own format](supported_formats/supporting_your_own_format.md) - For supporting your own serialization and deserialization formats.
102102

103103
[Maintaining backwards compatability](backwards_compatability.md) - Instructions on how to ensure that your API is backwards-compatible with older versions.
104104

mkdocs.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,16 @@ extra:
6565

6666
# https://www.mkdocs.org/user-guide/configuration/#validation
6767
#validation:
68-
# omitted_files: warn
6968
# absolute_links: warn
7069
# unrecognized_links: warn
7170

71+
validation:
72+
omitted_files: warn
73+
links:
74+
absolute_links: relative_to_docs
75+
anchors: warn
76+
unrecognized_links: warn
77+
7278
extra_css:
7379
- assets/stylesheets/tweaks.css
7480

@@ -127,6 +133,20 @@ watch:
127133
plugins:
128134
- search
129135
- meta
136+
- htmlproofer:
137+
enabled: !ENV [ENABLED_HTMLPROOFER, False]
138+
raise_error_after_finish: True
139+
raise_error_excludes:
140+
403: ['*']
141+
502: ['*']
142+
504: ['*']
143+
144+
ignore_urls:
145+
- localhost:8080/*
146+
- mailto:*
147+
- 'data:image/*'
148+
- '#*'
149+
130150

131151
hooks:
132152
- docs/plugins/main.py

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ version = "0.14.1"
66
dependencies = [
77
"mkdocs~=1.6",
88
"mkdocs-material~=9.5",
9+
"mkdocs-htmlproofer-plugin~=1.2",
910
]
1011

1112
[tool.hatch.envs.insiders]
1213
dependencies = [
1314
"mkdocs~=1.6",
1415
"mkdocs-material @ git+https://{env:GH_C17_DEV_TOKEN}@github.com/squidfunk/[email protected]",
16+
"mkdocs-htmlproofer-plugin~=1.2",
1517
]

0 commit comments

Comments
 (0)