unplugin / unplugin-vue-markdown

Compile Markdown to Vue component
MIT License
508 stars 27 forks source link

refactor: externalize frontmatter plugin #5

Closed meteorlxy closed 2 years ago

meteorlxy commented 2 years ago

@mdit-vue/plugin-frontmatter is built on gray-matter, but wrap the frontmatter / excerpt parsing inside markdown-it rendering workflow, and extract the result to the env.

Also, that plugin supports rendering exerpt to html, but I currently disable it to be consistent with our current behavior.

If this PR is accepted, I think we can go one step further to replace grayMatterOptions with frontmatterOptions, which accepts options for @mdit-vue/plugin-frontmatter (breaking change). Then users could enbale renderExcerpt by themselves.

antfu commented 2 years ago

Thanks. I have invited you to the repo, or rather do you think it's a good idea to maintain this plugin under mdit-vue org?

meteorlxy commented 2 years ago

@antfu Sounds like a good idea. I've changed your role as the owner of @mdit-vue org.