useFrontmatter
useFrontmatter returns the frontmatter of the current page in a convenient object.
- Type:
() => { frontmatter: FrontMatterMeta }
Example: render a custom badge when the page is marked as beta in frontmatter.
Combine with
usePagewhen you also need other page metadata (title, route, toc, etc.).