Repository navigation
Expand file tree
/
Copy pathlychee.toml
More file actions
93 lines (84 loc) · 4.48 KB
/
Copy pathlychee.toml
File metadata and controls
93 lines (84 loc) · 4.48 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
# lychee configuration — https://lychee.cli.rs
# Checks *external* URLs for rot (404s, dead domains) on a schedule. This
# complements `mint broken-links` (which validates internal/relative links) and
# replaces the external half of Mintlify's "Fix broken links" workflow.
# Only check web URLs — relative/internal links are mint's job.
scheme = ["https", "http"]
# Resolve root-relative links (e.g. /evm/foo) against the live site so lychee
# doesn't warn that it can't build a URL for them...
base_url = "https://docs.sei.io"
# Network behavior.
# Deprecated section (SIP-3) — don't check its links.
exclude_path = ["cosmos-sdk"]
max_concurrency = 16
max_retries = 3
retry_wait_time = 2
timeout = 20
# A real browser UA avoids naive bot-blocks.
user_agent = "Mozilla/5.0 (compatible; lychee link checker; +https://github.com/sei-protocol/sei-docs)"
# Treat rate-limiting / bot-challenge responses as OK rather than broken. 405
# (Method Not Allowed) covers JSON-RPC endpoints like evm-rpc.sei-apis.com that
# reject the checker's GET but are very much alive.
accept = ["200..=206", "301", "302", "304", "403", "405", "429"]
# Don't flag these — local/example hosts and domains that hard-block automated
# requests (so a failure here is a false positive, not real rot).
exclude = [
# ...then skip the docs site itself — `mint broken-links` owns internal links.
# blog.sei.io, dashboard.sei.io, www.sei.io and all third-party URLs are still checked.
"^https?://docs\\.sei\\.io",
"^https?://localhost",
"^https?://127\\.0\\.0\\.1",
"^https?://0\\.0\\.0\\.0",
"^https?://.*\\.local",
"^https?://example\\.(com|org|net)",
"^https?://(www\\.)?(twitter|x)\\.com",
"^https?://(www\\.)?linkedin\\.com",
"^https?://(www\\.)?reddit\\.com",
"^https?://(t\\.me|discord\\.gg|discord\\.com)",
# Live sites that hard-block automated checkers (verified reachable in a browser):
# silostaking.io → 402 Payment Required to bots
# dashboard.pimlico.io → 404 to bots (client-rendered app shell)
# blog.thirdweb.com → cert chain rejected by lychee's TLS, fine in browsers
# updraft.cyfrin.io → 404 to bots (Cloudflare challenge), real 200 in browsers
"^https?://(www\\.)?silostaking\\.io",
"^https?://dashboard\\.pimlico\\.io",
"^https?://blog\\.thirdweb\\.com",
"^https?://(www\\.)?updraft\\.cyfrin\\.io",
# Sei's own JSON-RPC / REST node endpoints (evm-rpc[-testnet], rpc[-testnet])
# intermittently answer the checker with a transient 503 from gateway
# rate-limiting, though they serve real traffic and are referenced
# 140+ times across the docs. Node liveness is monitored elsewhere.
"^https?://(evm-)?rpc(-testnet)?\\.sei-apis\\.com",
# Third-party API endpoints the agent skills reference that are live but
# reject a plain GET: 1rpc.io/sei is JSON-RPC (400), api.pimlico.io needs an
# API key (401).
"^https?://1rpc\\.io",
"^https?://api\\.pimlico\\.io",
]
# Don't check mailto: links (this is the default; set explicitly for clarity).
include_mail = false
# Check GitHub file links (github.com/<owner>/<repo>/blob/<ref>/<path>) against
# raw.githubusercontent.com, the CDN that serves the same file for scripted
# downloads. A missing file, ref, or repo still returns 404 there, while
# github.com's rendered blob pages are the ones that answer the checker with
# 503s for files that exist. Reports show the raw URL. A blob link must point
# at a file; the CDN returns 404 for directories, so use /tree/ for those.
remap = [
"^https://github\\.com/([^/]+)/([^/]+)/blob/([^?#]+).* https://raw.githubusercontent.com/$1/$2/$3",
]
# Per-host throttling. NOTE: TOML table headers capture every key that follows
# them, so keep all top-level options above this line.
#
# github.com is by far the most-linked host (roughly a fifth of all unique
# URLs). Hitting it with lychee's default per-host settings (10 requests in
# flight, 50 ms apart) trips GitHub's abuse detection, which answers 503/429
# for pages that are perfectly fine. That produced the false positives in
# https://github.com/sei-protocol/sei-docs/issues/77. lychee does not retry a
# 503, and the GITHUB_TOKEN API fallback can only validate bare owner/repo URLs
# (not blob/tree paths), so slowing down is what keeps 503s rare. It does not
# stop them entirely, which is why external-links.yml re-checks every failure
# before reporting it. Measured cost: with blob links remapped above, ~45
# github.com requests at one per second keep the full run under a minute.
[hosts."github.com"]
concurrency = 2
request_interval = "1s"