-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Is your feature request related to a problem? Please describe.
I want to display a preview of the blog post in my blog post list. To also allow HTML, the frontmatter is not suitable for that, since it doesn't allow markdown or html.
Describe the solution you'd like
Common practice in such frameworks is to use a markdown marker such as --- excerpt start --- and --- excerpt end --- to control what is provided within getPageMap (which could have an option for what data to include)
This would also solve not having to duplicate the content in both the frontmatter and as part of the blog post.
Describe alternatives you've considered
Alternatively, I could access the frontmatter to render it within its own blogpost to avoid the duplication.
I could also use <div dangerouslySetInnerHTML={{__html: ''}} /> to render the html in the frontmatter, although that would give me a worse developer experience, since I have to enter HTML in frontmatter - which does not highlight html tags or validate them.
Additional context
Using Nextra 4
Node v22.11.0
npm 10.9.0
Windows 10, WSL - Ubuntu