-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Injected frontmatter change #2250
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
2cc7d70
to
89eda6c
Compare
@@ -830,7 +830,7 @@ A function to compile a given Markdown or MDX document for rendering. This retur | |||
|
|||
- `<Content />` - A component used to render the document's contents in an Astro file. | |||
- `headings` - A generated list of headings, [mirroring Astro's `getHeadings()` utility](/en/guides/markdown-content/#exported-properties) on Markdown and MDX imports. | |||
- `injectedFrontmatter ` - An object of frontmatter [injected via remark or rehype plugins](/en/guides/markdown-content/#example-injecting-frontmatter). Set to type `any`. | |||
- `injectedFrontmatter ` - An object of frontmatter [modified via remark or rehype plugins](/en/guides/markdown-content/#modifying-frontmatter-programmatically). Set to type `any`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking that you still want to name this injectedFrontmatter
even though all our descriptions now refer to it as "modified frontmatter"? (I understand that changing the code is probably a bigger deal than changing words in the docs. Just pointing it out!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm aware, and I'm debating a good name for it 😓
pluginFrontmatter
is the rough name I'm going with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: decided on remarkPluginFrontmatter
! Remark is the umbrella for "remark and rehype plugins" according to the unified spec. Also want to clarify this is the frontmatter from remark only, and won't reflect any schemas you have applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, @bholmesdev! I think the change is so great for usablility! 🚀
Some non-blocking comments for thought!
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
What kind of changes does this PR include?
Description
data.astro.frontmatter
now includes all document frontmatter properties