Getting Started
A Starlight plugin to add a blog to your documentation site.
- Link to the blog in the header
- Post list with pagination
- Global and per-post authors
- Tags
- Custom sidebar with recent posts and tags
- RSS (requires the Astro
site
option to be set)
Check out the demo for a preview of the blog.
Prerequisites
You will need to have a Starlight website set up. If you don’t have one yet, you can follow the “Getting Started” guide in the Starlight docs to create one.
Install the plugin
Starlight Blog is a Starlight plugin. Install it using your favorite package manager:
Configure the plugin
The Starlight Blog plugin can be configured in your Starlight configuration in the astro.config.mjs
file.
The Starlight Blog plugin behavior can be tweaked using various configuration options.
Extend frontmatter schema
Extend Starlight’s frontmatter default schema to add support for customizing individual blog posts using their frontmatter in the src/content/config.ts
file:
Create your first blog post
Create your first blog post by creating a .md
or .mdx
file in the src/content/docs/blog/
directory:
Configure your RSS feed
Set the Astro site
configuration option and add Starlight’s social
RSS configuration option using your website’s full URL. Your RSS feed will be located at /blog/rss.xml
This will create a .xml
file for feed readers and add the standard RSS icon to your website’s header.
Learn more about RSS feeds in Astro, including how to enable RSS feed auto-discovery in the official Astro documentation.