Skip to content

Commit 27dd402

Browse files
sharadregoticlaude
andcommitted
Fix lychee erroring on root-relative paths
scheme = ["https", "http"] didn't help because lychee fails to build the URL before the scheme filter runs. Set base = "https://tyk.io" so root-relative paths (/img/..., /page/...) are resolved to https://tyk.io/... and then silently skipped by the existing tyk.io exclude rule, rather than producing "cannot convert path to URI" errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7ff7c6b commit 27dd402

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

lychee.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Lychee external link checker configuration
22
# Docs: https://lychee.cli.rs/usage/configuration/
33

4-
# Only check http/https URLs — skips root-relative paths (/img/..., /page/...),
5-
# file paths, mailto:, etc. Internal links are validated by validate-docs.yml.
4+
# Only check http/https URLs — skips mailto:, file://, etc.
65
scheme = ["https", "http"]
76

7+
# Resolve root-relative links (e.g. /img/..., /page/...) against the live docs
8+
# base URL. Combined with the tyk.io exclude rule below, these get silently
9+
# skipped rather than erroring as "cannot convert path to URI".
10+
base = "https://tyk.io"
11+
812
# Only check external URLs — internal links are validated by validate-docs.yml
913
exclude = [
10-
# Tyk-owned domains (covered by internal link checks)
14+
# Tyk-owned domains (covers root-relative paths resolved via base above)
1115
"https?://(.*\\.)?tyk\\.io",
1216
"https?://(.*\\.)?tyktech\\.net",
1317

0 commit comments

Comments
 (0)