Skip to content

Commit 72faf94

Browse files
committed
fix: align lychee config with docs repo best practices
- Add skip_code_blocks=true (important for notebooks with example code) - Add require_https=false for development flexibility - Simplify accept codes to just 403 and 429 (like docs) - Add www.claude.ai to exclusions - Exclude .github/ and scripts/ paths from checking - Better comments explaining each setting
1 parent 97647e9 commit 72faf94

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

lychee.toml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,49 @@
11
# Lychee configuration for Anthropic Cookbook
2-
cache = true
3-
max_cache_age = "1d"
2+
# Validates links in notebooks and documentation
3+
4+
# Core settings
45
timeout = 30
56
max_redirects = 10
7+
include_fragments = true
8+
require_https = false
9+
10+
# Caching to speed up repeated checks
11+
cache = true
12+
max_cache_age = "1d"
13+
14+
# Retry configuration for transient failures
615
max_retries = 3
716
retry_wait_time = 2
8-
include_fragments = true
9-
skip_missing = false
1017

11-
# Jupyter-specific settings
12-
glob_ignore_case = true
18+
# Skip checking code blocks (important for notebooks with example code)
19+
skip_code_blocks = true
20+
21+
# Fallback extensions for local file checking
22+
# When checking relative links, try these extensions if the exact path doesn't exist
1323
fallback_extensions = ["ipynb", "md", "html", "py"]
1424

25+
# Exclude certain paths from being searched
1526
exclude_path = [
1627
".git/",
1728
"__pycache__/",
1829
".ipynb_checkpoints/",
19-
"*.pyc"
30+
"*.pyc",
31+
".github/",
32+
"scripts/"
2033
]
2134

35+
# Exclude API endpoints and local development URLs from link checking
2236
exclude = [
2337
"https://api.anthropic.com.*",
2438
"https://console.anthropic.com.*",
39+
"https://www.claude.ai/",
2540
"http://localhost.*",
2641
"http://127.0.0.1.*"
2742
]
2843

29-
# Accept these status codes
30-
accept = [200, 201, 202, 203, 204, 206, 301, 302, 303, 304, 307, 308, 403, 429]
44+
# Accept 403 (forbidden) and 429 (rate limited) as valid
45+
# These are returned by gated and rate-limited sites
46+
accept = [403, 429]
3147

3248
# Headers for authenticated requests
3349
headers = [

0 commit comments

Comments
 (0)