ukaea/PROCESS

Mkdocs warnings need to be captured

Closed this issue · 1 comments

When running mkdocs serve locally, several warnings are output which have led to problems like the ones mentioned in #3123. Is there a way to escalate these warnings to errors such that the CI fails? That way if any changes are made to the docs that break links or just don't work, they can be fixed before they're merged in.

Following/copying comments from #3163 (comment)

MkDocs raises a warning for content (image) links that cannot be found, and raises info logs for anchors that are invalid. Using mkdocs build --strict we could make a test that fails on warnings (ie, when image links are incorrect) but this would not fix anchors being incorrect.

Further, certain plugins we use to mark dates of change of pages raise warnings when a page is not tracked in GitHub. We have several dynamically generated pages, such as vardes.md, and warnings are raised for these pages. Therefore, we would need to work around this limitation to use the strict flag without the test constantly failing.

Therefore, we believe adding a test is simply not worth it, and developers and reviewers will need to remain responsible for ensuring documentation renders correctly.