-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlychee.toml
More file actions
105 lines (85 loc) · 3.44 KB
/
lychee.toml
File metadata and controls
105 lines (85 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Lychee link checker configuration
# https://lychee.cli.rs/configuration/
# Verbose program output
# Accepts log level: "error", "warn", "info", "debug", "trace"
verbose = "error"
# Accept these HTTP status codes as valid
# 403 is included because many sites block automated requests (bot detection)
accept = [200, 204, 301, 302, 307, 308, 403]
# User agent for requests (full Chrome version to avoid bot detection)
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
# Don't show interactive progress bar while checking links.
no_progress = false
# Request timeout in seconds
timeout = 30
# Maximum number of retries per request
max_retries = 3
# Wait time between retries (seconds)
retry_wait_time = 10
# Maximum concurrent requests
max_concurrency = 128
# Don't check URL fragments/anchors (e.g. #section-name).
# Fragment validation requires fetching and parsing the full HTML of each target
# page, which greatly increases the number of requests and triggers the known
# lychee SendError panic (race condition during shutdown).
include_fragments = false
# Only test links with the given schemes (e.g. https).
# Omit to check links with any other scheme.
# At the moment, we support http, https, file, and mailto.
scheme = ["https"]
# When links are available using HTTPS, treat HTTP links as errors.
require_https = true
# Exclude patterns (regex)
exclude = [
# Placeholder/example URLs
"^https://example\\.com",
"^https://github\\.com/owner/repo",
"github\\.com/your-org/",
# Government sites that block automated requests
"^https://(www\\.)?fcc\\.gov",
# Analytics and tracking
"^https://us\\.i\\.posthog\\.com",
"^https://c\\.vialoops\\.com",
"_vercel/(speed-)?insights/",
# Sites that block automated requests
"^https://docs\\.stack-auth\\.com",
"^https://(www\\.)?linkedin\\.com",
"^https://(www\\.)?twitter\\.com",
"^https://x\\.com",
"^https://www\\.npmjs\\.com",
"^https://cdn\\.simpleicons\\.org",
"^https://(www\\.)?ctia\\.org",
"^https://(www\\.)?pcre\\.org",
# Auto-generated links (Fern "Ask AI" feature)
"^https://claude\\.ai",
# GitHub URLs (verified locally or via separate low-concurrency check)
# Note: This blanket exclude is used when excludeGithub=true in the Node script
# The script handles GitHub URLs separately to avoid rate limiting
"^https://github\\.com/",
"^https://github\\.githubassets\\.com",
# Static assets (CSS, JS, fonts, images) — no need to link-check these
"\\.(css|js|woff2?|ttf|eot|svg|png|jpe?g|webp|gif|ico)([?#]|$)",
# Fern renders a phantom /assets/images/... URL from a CSS comment (fixed in styles.css,
# but keep this exclude until the fix is deployed and confirmed)
"/assets/images/\\.\\.\\.",
# Non-HTTP schemes
"^mailto:",
"^tel:",
"^javascript:",
"^#"
]
# Browser-like headers to trigger Vercel edge revalidation.
# Without these, Vercel serves stale cache and never revalidates.
# The sec-fetch-* headers signal a real browser navigation vs a bot/crawl.
[header]
accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8"
accept-language = "en-US,en;q=0.9"
cache-control = "max-age=0"
sec-fetch-dest = "document"
sec-fetch-mode = "navigate"
sec-fetch-site = "none"
sec-fetch-user = "?1"
upgrade-insecure-requests = "1"
sec-ch-ua = "\"Chromium\";v=\"146\", \"Not-A.Brand\";v=\"24\""
sec-ch-ua-mobile = "?0"
sec-ch-ua-platform = "\"Windows\""