-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new markdown.frontmatterPlugins config option #3411
Conversation
|
Any progress on this @sylvinus? I'm really excited for this change |
@mattfelten I'm excited for it as well! An official RFC has been created: withastro/roadmap#196 ; Not sure what/when the next steps are. |
The RFC was accepted! https://github.com/withastro/rfcs/blob/main/proposals/0022-frontmatter-plugins.md Think the next step would be to get this PR polished and then it can be merged! |
By the way in the meantime I've also been using a custom plugin to register all available components in Markdown files:
|
Going to close since this branch is fairly stale. Feel free to resubmit when you have it working. |
FYI I probably won't have time to submit a more polished PR. It would be great if a more regular contributor could have a go at it! |
@delucis, @matthewp, some months have passed and yay, Astro v2! Trying to figure out the status + next steps for this. Aside from rebasing + polishing this PR, maybe the RFC should be reviewed to make sure it's still in alignment with other goals & sufficiently clear? Context: The RFC has two unresolved questions, should those be addressed before someone picks up this PR? (Coming here from #397 (comment)) |
Modifying frontmatter as proposed in this RFC is now available! Some docs: https://docs.astro.build/en/guides/markdown-content/#modifying-frontmatter-programmatically |
Hello!
Currently, when importing Markdown files, one can modify their content via the
markdown.remarkPlugins
andmarkdown.rehypePlugins
config options.However there is currently no supported way to do the same with their frontmatter. This could open up interesting usecases:
frontmatter.setup
!)frontmatterDefaults
suggestion here: Simplify Markdown Layouts roadmap#172 (comment)This patch adds a prototype implementation of a new
frontmatterPlugins
config option.Let me know what you think!
Thanks,