Repository navigation
Expand file tree
/
Copy pathlychee.toml
More file actions
75 lines (56 loc) · 1.85 KB
/
Copy pathlychee.toml
File metadata and controls
75 lines (56 loc) · 1.85 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
# Lychee link checker configuration
# https://github.com/lycheeverse/lychee
# Maximum number of concurrent requests
max_concurrency = 10
# Request timeout in seconds
timeout = 30
# Maximum number of retries for failed requests. The wait between retries
# doubles each time, which gives rate-limited hosts such as github.com time
# to recover.
max_retries = 4
# User agent string
user_agent = "Mozilla/5.0 (compatible; lychee link checker)"
# Accept these status codes as valid
accept = [200, 201, 202, 203, 204, 301, 302, 303, 307, 308]
# Check internal links (links within the same domain)
skip_missing = false
# Include anchor/fragment checking
include_fragments = "anchor-only"
# Cache results for 1 hour to speed up repeated checks
cache = true
# Only check links with these URL schemes
scheme = ["http", "https"]
# Exclude patterns (can also be in .lycheeignore)
exclude = [
# Common patterns for example/placeholder URLs
"example\\.com",
"example\\.org",
"127\\.0\\.0\\.1",
# GitHub edit/tree/blob links (these flood GitHub with requests)
"github\\.com/.*/edit/",
"github\\.com/.*/tree/",
"github\\.com/.*/blob/",
# GitHub API endpoints
"api\\.github\\.com",
# Google OAuth and API endpoints (require authentication)
"googleapis\\.com",
# Social media that blocks bots
"twitter\\.com",
"x\\.com",
"linkedin\\.com",
# Dynamic or JavaScript-only content
"^#$",
"^javascript:",
# Email addresses
"^mailto:",
# Tel links
"^tel:",
]
# Remap URLs (useful for checking production URLs against a local build)
# CI passes --remap to check https://docs.infrahub.app links against the
# locally served build, for example:
# remap = ["^https://docs\\.infrahub\\.app http://localhost:3000"]
# github.com answers bursts of requests with 429, so space them out
[hosts."github.com"]
concurrency = 2
request_interval = "500ms"