diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da2cee0..2cf5e09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,3 +177,21 @@ jobs: echo "$errors template validation failures" exit $errors + + check-links: + name: Check Markdown Links + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + + - name: Check markdown links + uses: lycheeverse/lychee-action@v2 + with: + args: >- + --verbose + --no-progress + --config .lychee.toml + '*.md' + 'docs/**/*.md' + fail: true diff --git a/.lychee.toml b/.lychee.toml new file mode 100644 index 0000000..72a7968 --- /dev/null +++ b/.lychee.toml @@ -0,0 +1,40 @@ +# Lychee link checker configuration +# https://lychee.cli.rs/usage/config/ + +# Directories and files to exclude from checking +exclude_path = [ + "node_modules", + ".git", + "pnpm-lock.yaml", + ".claude" +] + +# Max number of retries per request (handles transient failures) +max_retries = 3 + +# Timeout per request in seconds +timeout = 30 + +# Max concurrent requests (avoid rate limiting) +max_concurrency = 5 + +# Accept 200..=299 status codes +accept = [200, 201, 202, 203, 204, 206, 429] + +# Exclude URLs that are known to block automated checks or are placeholders +exclude = [ + # Patreon blocks automated requests + "https://www.patreon.com/.*", + # Shield badge images (always valid if the URL format is correct) + "https://img.shields.io/.*", + # Contributor Covenant version-specific URLs may redirect + "https://www.contributor-covenant.org/version/.*", + # Example/placeholder URLs + "https://example.com.*" +] + +# Don't fail on URLs behind authentication or known to be flaky +exclude_all_private = true + +# Skip checking mail addresses +include_mail = false