fix(path): improper redirects in subpath domain sites

This commit is contained in:
saberzero1
2026-04-22 18:25:05 +02:00
parent ff19a3bf38
commit b3082c32dc
4 changed files with 22 additions and 9 deletions
+9
View File
@@ -170,6 +170,15 @@ describe("transforms", () => {
["content/with spaces", "./content/with-spaces"],
["content/with spaces/index", "./content/with-spaces/"],
["content/with spaces#and Anchor!", "./content/with-spaces#and-anchor"],
// Folder note convention: same-name parent triggers /index rewrite → folder path
["characters/characters", "./characters/"],
["My Folder/My Folder", "./my-folder/"],
["a/b/c/d/d", "./a/b/c/d/"],
["My Folder/My Folder#heading", "./my-folder/#heading"],
// Non-matching last segments: no folder rewrite
["characters/alice", "./characters/alice"],
// Percent-encoded spaces
["My%20Folder/My%20Note", "./my-folder/my-note"],
],
path.transformInternalLink,
(_x: string): _x is string => true,