Skip to content

Pass "frontmatter" variable to content renderer#1769

Merged
delucis merged 4 commits into
withastro:mainfrom
ncjones:ncjones-patch-frontmatter-var
Apr 30, 2024
Merged

Pass "frontmatter" variable to content renderer#1769
delucis merged 4 commits into
withastro:mainfrom
ncjones:ncjones-patch-frontmatter-var

Conversation

@ncjones
Copy link
Copy Markdown
Contributor

@ncjones ncjones commented Apr 18, 2024

Setting the "frontmatter" variable allows markdoc content to access the frontmatter like {% $frontmatter.title %}. This pattern is documented in the Astro markdoc guide:

https://docs.astro.build/en/guides/integrations-guide/markdoc/#access-frontmatter-from-your-markdoc-content

Setting the "frontmatter" variable allows markdoc content to access the frontmatter like `{% $frontmatter.title %}`

This pattern is documented in the Astro markdoc guide:

https://docs.astro.build/en/guides/integrations-guide/markdoc/#access-frontmatter-from-your-markdoc-content
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 18, 2024

🦋 Changeset detected

Latest commit: 1ef0ddf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Apr 30, 2024 2:44pm

@github-actions github-actions Bot added the 🌟 core Changes to Starlight’s main package label Apr 18, 2024
@astrobot-houston
Copy link
Copy Markdown
Contributor

Hello! Thank you for opening your first PR to Starlight! ✨

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel 🤩

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR and your patience on this one.

I added a changeset so this gets added to our change log, but the change seems fair enough to me. I kind of feel like Astro should take care of this by default, but until that’s the case, I think this is fine to add.

@delucis delucis merged commit bd5f1cb into withastro:main Apr 30, 2024
@astrobot-houston astrobot-houston mentioned this pull request Apr 30, 2024
Yoxnear pushed a commit to Yoxnear/starlight-custom that referenced this pull request Jul 23, 2025
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌟 core Changes to Starlight’s main package 🌟 minor Change that triggers a minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants