You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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-”
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.
The text was updated successfully, but these errors were encountered:
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:
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.The text was updated successfully, but these errors were encountered: