-
Notifications
You must be signed in to change notification settings - Fork 194
Closed
Milestone
Description
There is a problem with _raw.flattenedPath
in generated JSON schemas for content files.
If there is a file with "index" in the end of filename then this part will be erased in resulted value of _raw.flattenedPath
For example:
- “search-by-index.mdx” will be resulted into “search-by-” in generated JSON schema;
- “find-element-by-index.md” will be resulted into “find-element-by-“
- “solution-documents/search-by-index.mdx” will be resulted into “solution-documents/search-by-“
- “solution-documents/find-element-by-index.md” will be resulted into “solution-documents/find-element-by-”
Here is a repo to reproduce the issue: https://github.com/Oleksandr-Kei/contentlayer-project
Actual problem could be in this line
Because /\/?index$/
covers not only cases of "something/index" and "index". But also cases like "something-index", "somethingindex", etc.
Metadata
Metadata
Assignees
Labels
No labels