vitepress
vitepress copied to clipboard
Expose the built-in markdown parser to render markdown-valued variables with
Is your feature request related to a problem? Please describe.
My CMS stores markdown values in frontmatter data. For example, an intro section intro
with a markdown string value. Currently, trying to access it in the page with {{ $frontmatter.intro }}
just renders it as a string (a direct result of the markdown -> Vue -> HTML pipeline). What is the recommended way to call the markdown parser on it?
Describe the solution you'd like
It would be nice to see this exposed somehow (getting the built-in markdown-it instance, for example).
Describe alternatives you've considered
I could install markdown-it separately and use it that way?
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Read the Contributing Guidelines.
- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.