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
# create a new project with pnpm pnpm create astro --template starlight
# create a new project with yarn yarn create astro --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!
Starlight supports authoring content in Markdown and MDX. (You can add support for Markdoc by installing the experimental Astro Markdoc integration.)
Add new pages to your site automatically by creating
.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
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.
Starlight is an Astro integration, and is updated like any
# upgrade Starlight with npm npm install @astrojs/starlight@latest
# upgrade Starlight with pnpm pnpm upgrade @astrojs/starlight --latest
# upgrade Starlight with yarn yarn upgrade @astrojs/starlight --latest
You can see a full list of the changes made in each release in the Starlight changelog.
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!