Skip to content

Commit

Permalink
Pass "frontmatter" variable to content renderer (#1769)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
  • Loading branch information
ncjones and delucis committed Apr 30, 2024
1 parent 681a427 commit bd5f1cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-planets-destroy.md
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': minor
---

Adds support for [accessing frontmatter data as a variable](https://docs.astro.build/en/guides/integrations-guide/markdoc/#access-frontmatter-from-your-markdoc-content) when using Markdoc
2 changes: 1 addition & 1 deletion packages/starlight/index.astro
Expand Up @@ -16,4 +16,4 @@ const { Content, headings } = await Astro.props.entry.render();
const route = generateRouteData({ props: { ...Astro.props, headings }, url: Astro.url });
---

<Page {...route}><Content /></Page>
<Page {...route}><Content frontmatter={Astro.props.entry.data} /></Page>

0 comments on commit bd5f1cb

Please sign in to comment.