Skip to content

Commit 7caac85

Browse files
committed
Move lynche config to a config file
1 parent adb9778 commit 7caac85

File tree

3 files changed

+62
-9
lines changed

3 files changed

+62
-9
lines changed

.github/workflows/links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0
1919
with:
2020
fail: true
21-
args: --include-fragments --accept '100..=103, 200..=299, 402..=403, 429' './**/*.md' './**/*.html'
21+
args: "'./**/*.md' './**/*.html'"
2222

2323
- name: Create Issue From File
2424
if: steps.lychee.outputs.exit_code != 0

.lycheeignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

lychee.toml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Lychee link checker configuration
2+
# https://lychee.cli.rs/#/usage/config
3+
#
4+
# To check the generated site (after running `hugo`):
5+
# lychee './public/**/*.html'
6+
#
7+
# To check source files:
8+
# lychee './content/**/*.md' './assets/**/*.md'
9+
10+
# Base URL for resolving relative links
11+
# This allows checking internal site links against the live/generated site
12+
base_url = "https://dev.maxmind.com"
13+
14+
# Include URL fragments in checks
15+
include_fragments = true
16+
17+
# Don't allow any redirects
18+
max_redirects = 0
19+
20+
# Accept these HTTP status codes
21+
# 100-103: Informational responses
22+
# 200-299: Success responses
23+
# 403: Forbidden (some sites use for rate limiting)
24+
# 429: Too Many Requests
25+
# 500-599: Server errors (temporary issues shouldn't fail CI)
26+
# 999: LinkedIn's custom status code
27+
accept = [
28+
"100..=103",
29+
"200..=299",
30+
"403",
31+
"429",
32+
"500..=599",
33+
"999"
34+
]
35+
36+
# Exclude URL patterns from checking (treated as regular expressions)
37+
exclude = [
38+
'^file://', # Local file:// URLs
39+
# Exclude internal dev.maxmind.com links (they're relative paths in source)
40+
# To check internal links, run against generated site: lychee './public/**/*.html'
41+
'^https://dev\.maxmind\.com/',
42+
'^https://deno\.land', # Deno documentation
43+
'^https://github\.com/[^/]+/[^/]+/blob/[0-9a-fA-F]+/.+#L\d+$', # GitHub blob URLs with line numbers
44+
'^https://jsr\.io', # JSR (JavaScript Registry)
45+
'^https://sandbox\.maxmind\.com', # MaxMind sandbox environment
46+
'^https://minfraud\.maxmind\.com', # MaxMind minFraud service
47+
'https://www\.iso\.org/obp/ui/#iso:code:3166:ZA', # ISO country code reference
48+
'^https://www\.maxmind\.com/en/accounts/', # MaxMind account pages (require login)
49+
]
50+
51+
# Exclude file paths from getting checked (treated as regular expressions)
52+
exclude_path = [
53+
'node_modules', # Exclude node_modules directory
54+
]
55+
56+
# Cache results for 1 day to speed up repeated checks
57+
cache = true
58+
max_cache_age = "1d"
59+
60+
# Skip missing input files instead of erroring
61+
skip_missing = true

0 commit comments

Comments
 (0)