-
-
Notifications
You must be signed in to change notification settings - Fork 553
Open
Description
Problem

I find an issue with filePathStem, when a file path starts with a dir of single char name, e.g. 1/2025.11ty.js,
the filePathStem will resolve to /2025 rather than the correct one /1/2025.
Root Cause
I've found the root cause in the file https://github.com/11ty/eleventy/blob/main/src/TemplateFileSlug.js, line:12:
this.cleanInputPath = inputPath.replace(/^.\//, "");
<== the bug
The dot sign within the regex should be escaped as follow, please check and review.
this.cleanInputPath = inputPath.replace(/^\.\//, "");
Regards,
Metadata
Metadata
Assignees
Labels
No labels