Skip to content
Starlight
GitHubDiscord

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.

Troubleshooting Starlight

Both Starlight project configuration and individual page frontmatter configuration information are available in the Reference section of this site. Use these pages to ensure that your Starlight site is configured and functioning properly.

See the growing list of guides in the sidebar for help adding content and customizing your Starlight site.

If your answer cannot be found in these docs, please visit the full Astro Docs for complete Astro documentation. Your question may be answered by understanding how Astro works in general, underneath this Starlight theme.

You can also check for any known Starlight issues on GitHub, and get help in the Astro Discord from our active, friendly community! Post questions in our #support forum with the “starlight” tag, or visit our dedicated #starlight channel to discuss current development and more!