Skip to content

Commit bc2c86f

Browse files
authored
Merge pull request #68 from PMDevSolutions/5-add-markdown-link-validation-to-ci
feat: add markdown link validation to CI
2 parents 30138c3 + 0d8dc08 commit bc2c86f

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,21 @@ jobs:
177177
178178
echo "$errors template validation failures"
179179
exit $errors
180+
181+
check-links:
182+
name: Check Markdown Links
183+
runs-on: ubuntu-latest
184+
timeout-minutes: 5
185+
steps:
186+
- uses: actions/checkout@v4
187+
188+
- name: Check markdown links
189+
uses: lycheeverse/lychee-action@v2
190+
with:
191+
args: >-
192+
--verbose
193+
--no-progress
194+
--config .lychee.toml
195+
'*.md'
196+
'docs/**/*.md'
197+
fail: true

.lychee.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Lychee link checker configuration
2+
# https://lychee.cli.rs/usage/config/
3+
4+
# Directories and files to exclude from checking
5+
exclude_path = [
6+
"node_modules",
7+
".git",
8+
"pnpm-lock.yaml",
9+
".claude"
10+
]
11+
12+
# Max number of retries per request (handles transient failures)
13+
max_retries = 3
14+
15+
# Timeout per request in seconds
16+
timeout = 30
17+
18+
# Max concurrent requests (avoid rate limiting)
19+
max_concurrency = 5
20+
21+
# Accept 200..=299 status codes
22+
accept = [200, 201, 202, 203, 204, 206, 429]
23+
24+
# Exclude URLs that are known to block automated checks or are placeholders
25+
exclude = [
26+
# Patreon blocks automated requests
27+
"https://www.patreon.com/.*",
28+
# Shield badge images (always valid if the URL format is correct)
29+
"https://img.shields.io/.*",
30+
# Contributor Covenant version-specific URLs may redirect
31+
"https://www.contributor-covenant.org/version/.*",
32+
# Example/placeholder URLs
33+
"https://example.com.*"
34+
]
35+
36+
# Don't fail on URLs behind authentication or known to be flaky
37+
exclude_all_private = true
38+
39+
# Skip checking mail addresses
40+
include_mail = false

0 commit comments

Comments
 (0)