Getting Started
A Starlight plugin to version documentation pages. Check out the demo for a preview of the plugin in action.
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.
Installation
When ready to version your documentation pages, you can install and configure the Starlight Versions plugin.
-
Starlight Versions is a Starlight plugin that you can install using your favorite package manager:
-
Configure the plugin in your Starlight configuration in the
astro.config.mjs
file.The following example shows how to configure a single version
1.0
for your documentation: -
Starlight Versions uses Astro’s content collections, which are configured in the
src/content.config.ts
file.Update the content config file, adding a
versions
collection that uses Starlight VersionsdocsVersionsLoader
: -
Start the development server to create the first version of your documentation.
The current state of your documentation will be archived as the newly configured
1.0
version while you continue to work on the current version.
Learn more about versioning in the “Create a New Version” guide or how to configure the plugin in the configuration reference.