Astro Starlight site, source under src/content/docs/.
cd docs
npm install
npm run dev # http://localhost:4321npm run build # outputs to docs/dist
npm run preview # serve the built site locallydocs/
βββ astro.config.mjs # Site title, sidebar, theme
βββ src/
β βββ content.config.ts # Starlight content collection
β βββ content/docs/ # All markdown / mdx pages
β β βββ index.mdx
β β βββ getting-started/
β β βββ concepts/
β β βββ guides/
β β βββ reference/
β βββ styles/custom.css
βββ package.json
Pages are plain Markdown (.md) with Starlight's frontmatter:
---
title: Page title
description: Shown in search and as the meta description.
---The MDX landing page (index.mdx) imports Starlight components for hero +
card grid layouts.
-
Drop a new
.md(or.mdx) undersrc/content/docs/<section>/. -
Add an entry to the matching sidebar group in
astro.config.mjs:{ label: 'My new page', slug: '<section>/<filename>' }
-
npm run devpicks it up immediately.