Skip to content
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

Pass "frontmatter" variable to content renderer #1769

Merged
merged 4 commits into from Apr 30, 2024

Conversation

ncjones
Copy link
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
Copy link

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

Copy link

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
Collaborator

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
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
9 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Apr 30, 2024
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.

None yet

3 participants