Destiner's notes

Access Frontmatter Values From a Markdown Page in Astro

24 February 2022

Sometimes, you want to access your frontmatter right from the component inside a Markdown page. Say, you have this in your frontmatter:

title: Post Title
description: Post description.

Here’s how you can access it:

<Heading title={frontmatter.title} />