Skip to content

Add lychee local Markdown link checker #2150

Closed

Description

@josecelano

Goal

Run lychee locally against this repository's Markdown, fix every genuine broken local link it reports, add a checked-in lychee.toml configuration that enables local anchor checking and documents intentional exclusions, then open the required follow-up issues for shared linting support and scheduled external-link monitoring.

Background

The shared linter binary from torrust/torrust-linting has no link checker. The repository has no automated check for local Markdown links breaking after files move or headings are renamed.

An exploratory lychee --offline run found roughly 170 broken local links. Most are in docs/issues/closed/, where historical specs have broken relative links, but findings also occur in ADRs, package READMEs, .github/skills/, and tests/AGENTS.md.

The normal project check must be deterministic: lychee offline mode with full local fragment validation. External URL checks are intentionally not part of pre-push or ordinary CI because third-party availability and network failures are outside repository control.

Scope

  • Add root lychee.toml with offline = true, include_fragments = "full", and narrowly documented exclusions, including historical closed issue specs.
  • Check the repository's maintained Markdown: root docs, docs/, AGENTS.md files, package READMEs, console/contrib/share docs, and .github/ workflow docs.
  • Record version, exact command, findings, classifications, link fixes, and final result in issue-local link-check-report.md; do not commit raw tool output.
  • Fix genuine broken local file and fragment links; classify all other findings as an explicit exclusion or historical/out of scope with rationale.
  • Create an issue in torrust/torrust-linting requesting a lychee subcommand that applies this offline local-link/local-fragment convention.
  • Create a tracker follow-up issue, blocked on that upstream request, for offline pre-commit/normal-CI enforcement and an advisory weekly, manually re-runnable online external-link workflow.

Acceptance criteria

  • lychee.toml enables offline mode and full fragment checks, and documents every exclusion inline.
  • link-check-report.md records lychee version, installation command, reproducible command, classification, fixes, and the clean re-run summary.
  • The final offline run has zero unresolved errors outside documented exclusions.
  • The torrust-linting request issue and tracker follow-up issue are created and cross-linked.
  • linter all passes.

Follow-up issue requirements

The tracker follow-up must make external checking advisory only: its weekly scheduled workflow may fail visibly, but must not become a required PR status check. It must support manual re-runs and define GITHUB_TOKEN use, bounded timeout/retries/concurrency, report-artifact retention, and re-run-before-triage procedure.

References

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions