Skip to content

Commit 08fca1d

Browse files
Copilothotlong
andcommitted
Fix lychee.toml syntax error - use correct remap format
Fixed TOML parse error: "invalid type: map, expected a string" The remap feature in lychee uses a simple key-value mapping table, not an array of tables with pattern/replace fields. Changed from: [[remap]] pattern = "^/docs/(.*)$" replace = "file://./docs/$1.mdx" To: [remap] "/docs/" = "file://./docs/" This maps all /docs/* URLs to the local docs/ directory, and lychee will automatically try common file extensions (.md, .mdx, etc.). Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 35f1fe1 commit 08fca1d

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

lychee.toml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,11 @@ exclude = [
3535

3636
# Path remapping for fumadocs internal links
3737
# Maps Next.js routes to actual file paths
38-
[[remap]]
39-
# Map /docs/* links to docs/*.mdx or docs/*.md files
40-
pattern = "^/docs/(.*)$"
41-
replace = "file://./docs/$1.mdx"
42-
43-
[[remap]]
44-
# Also try .md extension if .mdx doesn't exist
45-
pattern = "^/docs/(.*)$"
46-
replace = "file://./docs/$1.md"
47-
48-
[[remap]]
49-
# Handle index files (e.g., /docs/components/ -> docs/components/index.mdx)
50-
pattern = "^/docs/(.*)/+$"
51-
replace = "file://./docs/$1/index.mdx"
38+
# Note: Lychee remap is a simple key-value mapping
39+
[remap]
40+
# Map /docs/* links to docs/ filesystem paths
41+
# The file:// prefix tells lychee to check local files
42+
"/docs/" = "file://./docs/"
5243

5344
# Cache configuration
5445
[cache]

0 commit comments

Comments
 (0)