eth-protocol-fellows / protocol-studies

A study group learning about Ethereum and building protocol wiki
Other
144 stars 87 forks source link

Add automated link validation to GitHub workflow #295

Open Karrenbelt opened 3 months ago

Karrenbelt commented 3 months ago

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.

https://github.com/eth-protocol-fellows/protocol-studies/blob/3ceef0ccb31f95514afa420affc035c8286eb7dd/docs/eps/week1.md?plain=1#L28

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:

raxhvl commented 3 months ago

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.