Skip to content
Starlight

Getting Started

Creating a new project

Starlight is a full-featured documentation theme built on top of the Astro framework.

You can create a new Astro + Starlight project using the following command:

# create a new project with npm
npm create astro@latest -- --template starlight

This will create a new project directory with all the necessary files and configurations for your site.

Creating content with Starlight

Starlight is ready for you to add new content, or bring your existing files!

File formats

Starlight supports authoring content in Markdown and MDX. (You can add support for Markdoc by installing the experimental Astro Markdoc integration.)

Add pages

Add new pages to your site automatically by creating .md or .mdx files in src/content/docs/. Add sub-folders to organize your files, and to create multiple path segments:

src/content/docs/hello-world.md => your-site.com/hello-world
src/content/docs/guides/faq.md => your-site.com/guides/faq

Type-safe frontmatter

All Starlight pages share a customizable common set of frontmatter properties to control how the page appears:

---
title: Hello, World!
description: This is a page in my Starlight-powered site
---

If you forget anything important, Starlight will let you know.

Deploying your Starlight website

Once you have created and customized your Starlight website, you can deploy it to a web server or hosting platform of your choice including Netlify, Vercel, GitHub Pages and many more.

Learn about deploying an Astro site in the Astro docs.

Updating Starlight

Starlight is an Astro integration, and is updated like any @astrojs/* integration:

# upgrade Starlight with npm
npm install @astrojs/starlight@latest

You can see a full list of the changes made in each release in the Starlight changelog.