-
-
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
Empty Markdown frontmatter at build time #4429
Comments
Thanks for reporting @PaulFarault! So to be clear, the issue is "I expect my markdown frontmatter to be in I'm also unable to see the "MD files are processed twice" issue when building in your stackblitz example. I see this output: Before plugin: {}
After plugin: { title: 'Default title' }
Before plugin: {}
After plugin: { title: 'Default title' } Since there are 2 markdown files, this should mean the files were processed only once? Lmk if I'm missing something here. |
Hi Ben! Thx for your answer!
It's exactly that. Thanks for explaining me how it works. Would be nice to be able to have the frontmatter directly, for developping ease and even testing purposes!
I got the same output as you but twice, which I interpreted as "MD files are processed twice". I may have misinterpreted tho. Before plugin: {}
After plugin: { title: 'Default title' }
Before plugin: {}
After plugin: { title: 'Default title' }
Before plugin: {}
After plugin: { title: 'Default title' }
Before plugin: {}
After plugin: { title: 'Default title' } |
Was planning to make a 'Fake-CMS' remark plugin that would check the frontmatter for the properties I wanted to be present in every document. However, I recognized that this would be a bit of a hacky workaround. I'm glad I ran through Github issues because I found this beautifully detailed RFC: Kudos to @bholmesdev and the team, I am sorry if this goes off-topic, but I would be glad to contribute in whatever way. |
What version of
astro
are you using?1.0.6
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
When creating custom Markdown plugins (as in the doc):
The output is correct at the end but the lack of frontmatter makes development harder.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-vgrdek?file=content%2Farticle1.md,content%2Farticle2.md,astro.config.ts,src%2Fplugins%2FremarkGetTitle.ts,src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: