Skip to content

Frontmatter

Last Updated   March 29, 2025

Guide

What is Frontmatter?

Frontmatter is a block of metadata at the top of a Markdown file that provides information about the page. It is used by Starlight to generate the HTML pages and can be used to control various aspects of the page’s behavior and appearance.

What options are available?

The following options are available in the frontmatter for pages:

See Starlight - Frontmatter for more information and additional options.

FieldDescriptionRequired
titleString containing the title of the pageYes
categoryString of the category the page should be included in guide or referenceYes
layoutrelative path to one of the layouts in /src/layoutsYes
descriptionString containing the descriptive text to use in HTML meta tagsRecommended
lastUpdatedString in the format YYYY-MM-DD HH:MM:SSRecommended
draftBoolean value determining whether the page should be hidden from the production siteNo
slugString containing the URL slug for the pageNo
tableOfContentsBoolean value determining whether a table of contents should be generatedNo
templatedoc or splash default is doc. splash is a wider layout without the normal sidebarsNo
heroSee Starlight - Frontmatter HeroConfig for more informationNo
bannerSee Starlight - Frontmatter Banner for more informationNo
prevBoolean value determining whether a previous button should be shown. See Starlight - Frontmatter Prev for more informationNo
nextBoolean value determining whether a next button should be shown. See Starlight - Frontmatter Next for more informationNo
sidebarControl how the page is displayed in the sidebar. See Starlight - Frontmatter Sidebar for more informationNo

Example Frontmatter

---
title: Getting Started with the API
description: Get started with the Hardcover GraphQL API.
category: guide
lastUpdated: 2025-02-01 17:03:00
layout: ../../layouts/documentation.astro
---