Skip to content
AI Monorepos Free online conference · June 23 Join us!

Astro Starlight Docs template

A documentation site on Astro and Starlight, next to your code.

Terminal window
npx create-nx-workspace@latest my-workspace --template nrwl/astro-starlight-template
Astro Starlight Docs template preview

A documentation site built with Astro and Starlight - fast, searchable, and content-first. Set up inside an Nx monorepo so your docs live next to the code they describe and share components and content libraries with the rest of your monorepo.

Highlights

Docs next to your code

Keep documentation in the same monorepo as the product so it is updated in the same PR.

Starlight, preconfigured

Search, navigation, dark mode, and sensible defaults from Starlight - add your content.

Affected docs builds

Nx only rebuilds the docs site when something it depends on actually changes.

Quickstart

  • Start the docs site:
    Terminal window
    npx nx run docs:dev
  • Build the static site:
    Terminal window
    npx nx run docs:build
  • Build every project:
    Terminal window
    npx nx run-many -t build
  • Visualize your monorepo's graph in the browser:
    Terminal window
    npx nx graph

What's inside

  • apps/docs - Astro + Starlight documentation site
  • Nx targets: dev, build, preview

Speed up CI with Nx Cloud

Connect this monorepo to Nx Cloud to share one remote cache across your team and CI, and distribute tasks across machines as it grows.

  • Remote caching shared across your team and CI
  • Distributed task execution with Nx Agents
  • Automated e2e test splitting
  • CI that detects failures and proposes fixes

Learn more