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
Which scope/s are relevant/related to the feature request?
content
Information
The slug for the URL of a content page (markdown) can currently be explicitely added using a frontmatter attribute or by extracting it form the filename which is part of the ContentFile interface. It would be neat it the slug can be provided by the content plugin based on the filename without removing manually the path and extension parts form the filename string.
Which scope/s are relevant/related to the feature request?
content
Information
The slug for the URL of a content page (markdown) can currently be explicitely added using a frontmatter attribute or by extracting it form the
filename
which is part of theContentFile
interface. It would be neat it the slug can be provided by the content plugin based on the filename without removing manually the path and extension parts form thefilename
string.Suggestion
export interface ContentFile< Attributes extends Record<string, any> = Record<string, any>> { filename: string; + slug: string; content?: string; attributes: Attributes; }
Example
{ attributes: { ... } filename: "/src/content/2023-foo-bar.md", + slug: "2023-foo-bar" }
The slug should be URLEncoded.
Describe any alternatives/workarounds you're currently using
No response
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: