Frontmatter
You can customize individual blog posts by setting values in their frontmatter which is set at the top of your files between ---
separators:
Frontmatter fields
title
(required)
Type: string
The title of the blog post which will be displayed at the top of the page and in the blog post list.
date
(required)
Type: Date
The date of the blog post which must be a valid YAML timestamp. Posts are sorted by descending date in the blog post list.
lastUpdated
Type: Date | boolean
If a date is specified in a blog post for this Starlight frontmatter field, such date will also be displayed next to the blog post date.
Displayed only if different from the date
frontmatter field and must be a valid YAML timestamp.
tags
Type: string[]
A list of tags associated with the blog post displayed at the bottom of a blog post and in the blog post list.
excerpt
Type: string
The excerpt of the blog post used in the blog post list and tags pages. If not provided, the entire blog post content will be rendered.
authors
Type: StarlightBlogAuthorsConfig
The author(s) of the blog post. Check the “Authors” guide for more informations.
featured
Type: boolean
Default: false
Set whether this blog post should be considered featured. Featured blog posts are listed at the top of the sidebar in a dedicated “Featured posts” group.
The featured group is displayed only if at least one blog post is marked as featured. If a blog post is featured and also recent, it will be displayed only in the featured group.
draft
Type: boolean
Default: false
Set whether this blog post should be considered a draft and not be included in production builds.
Set to true
to mark a blog post as a draft and make it only visible during development.
cover
Type: CoverConfig
Add a cover image to the top of the blog post.
You can display different versions of the cover image in dark and light modes.
CoverConfig
readingTime
Type: number
Manually set a reading time for the blog post which is shown below the title and on all lists of blogs.
If the showReadingTime
configuration is set to true
this number gets calculated automatically and can be overridden by setting this value.
If it is set to false
only blog posts with this frontmatter field will show a reading time.