Skip to content

Add Markdown link checking of this project's Markdown files

Evan Read requested to merge eread/add-markdown-link-checking-to-project into main

What does this MR do and why?

Adds link checking of this project's Markdown files to this project.

Lychee dependency is handled with Brew. We could later add something like these for Linux distributions:

Here's the passing job: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/jobs/6567982137.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. Check out this branch.
  3. Run make setup.
  4. Break an internal link in README.md. For example, line 12.
  5. Run make test. You should get an error.
  6. Commit the change to the branch.
  7. Run yarn run lefthook run pre-push. You should get an error.
  8. Drop the commit that made the change that introduced the break.
  9. Run make test. You should get no error.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Evan Read

Merge request reports