Add automated link validation to GitHub workflow
Opened this issue · 1 comments
What content is missing?
There is currently no automated process to check the validity of links in the markdown files within the repository. This leads to potential broken links, affecting the user experience and the reliability of the documentation.
Related content in the wiki
Links break, such as this link here.
protocol-studies/docs/eps/week1.md
Line 28 in 3ceef0c
Other relevant resources
N/A
Proposal
I propose to add a test as part of the workflow to automatically check the validity of all links in the markdown files within the repository. This workflow should:
- Gather all links, both to local documents/sections and to external resources.
- Verify that the links are valid by checking:
- The path to a local document exists.
- HTTP requests to external resources return a status code 200 (OK).
To optimize the process:
- Return a complete report; do not error on first failure.
- A retry mechanism with a backoff strategy is recommended.
- A hashset, hashmap, or caching mechanism can be used to prevent redundant checks.
I agree with the sentiment.
Docsify uses client side rendering, which could make tracking internal pages challenging. Webarchive could potentially be rate limited if we send too many requests. I think the effort required for the workflow to reliably work will be non-trivial.
There are some github actions that checks broken links. Maybe test them out on a fork and let us know how well that works out.