Getting Started
Starlight is a full-featured documentation theme built on top of the Astro framework. This guide will help you get started with a new project. See the manual setup instructions to add Starlight to an existing Astro project.
Quick Start
Section titled âQuick StartâCreate a new project
Section titled âCreate a new projectâCreate a new Astro + Starlight project by running the following command in your terminal:
npm create astro@latest -- --template starlightpnpm create astro --template starlightyarn create astro --template starlightThis will create a new project directory with all the necessary files and configurations for your site.
Start the development server
Section titled âStart the development serverâWhen working locally, Astroâs development server lets you preview your work and automatically refreshes your browser when you make changes.
Inside your project directory, run the following command to start the development server:
npm run devpnpm devyarn devThis will log a message to your terminal with the URL of your local preview. Open this URL to start browsing your site.
Add content
Section titled âAdd contentâStarlight is ready for you to add new content, or bring your existing files!
Add new pages to your site by creating Markdown files in the src/content/docs/ directory.
Read more about file-based routing and support for MDX and Markdoc files in the âPagesâ guide.
Next steps
Section titled âNext stepsâ- Configure: Learn about common options in âCustomizing Starlightâ.
- Navigate: Set up your sidebar with the âSidebar Navigationâ guide.
- Components: Discover built-in cards, tabs, and more in the âComponentsâ guide.
- Extend: Explore community add-ons in our âPluginsâ and âThemesâ catalogs.
- Deploy: Publish your work with the âDeploy your siteâ guide in the Astro docs.
Updating Starlight
Section titled âUpdating StarlightâStarlight is an Astro integration. You can update it and other Astro packages by running the following command in your terminal:
npx @astrojs/upgradepnpm dlx @astrojs/upgradeyarn dlx @astrojs/upgradeSee the Starlight changelog for a full list of the changes made in each release.
Troubleshooting Starlight
Section titled âTroubleshooting StarlightâUse the project configuration and individual page frontmatter configuration reference pages to ensure that your Starlight site is configured and functioning properly. See the 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!