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 automated link validation to GitHub workflow #295

Open
Karrenbelt opened this issue Jun 20, 2024 · 1 comment
Open

Add automated link validation to GitHub workflow #295

Karrenbelt opened this issue Jun 20, 2024 · 1 comment

Comments

@Karrenbelt
Copy link
Contributor

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.

> Check this documentary with Dennis Ritchie and Ken Thompson, which perfectly captures spirit and ideas behind UNIX: https://yewtu.be/watch?v=tc4ROCJYbm0

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:

  1. Gather all links, both to local documents/sections and to external resources.
  2. 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.
@raxhvl
Copy link
Member

raxhvl commented Jun 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants