Skip to content

Astro Starlight Docs Template

Transform your Astro Starlight documentation with enterprise-grade analytics, privacy compliance, and search optimization in under 2 minutes.

Building documentation is easy with Astro and Starlight. But making it production-ready requires implementing analytics, GDPR compliance, SEO optimization, and modern AI crawler support. This tool does all of that in one command.

One Command Setup

Run npx astro-starlight-docs-template init and answer a few questions. Everything is configured automatically.

GDPR Compliant

Regional cookie consent with Google Consent Mode v2. Fully compliant with EU regulations out of the box.

Google Analytics Ready

Pre-configured GA4 with consent mode, IP anonymization, and secure cookie flags. No manual setup needed.

SEO Optimized

Open Graph tags, Twitter Cards, and Schema.org structured data ready. Rank higher in search results.

LLM Friendly

Generates llms.txt for AI crawlers like ChatGPT, Claude, and Gemini. Make your docs AI-discoverable.

Plugin Ecosystem

OpenAPI docs, Mermaid diagrams, blog, image zoom, and more — all pre-configured and ready to use.

  1. Navigate to your project

    Terminal window
    cd my-astro-docs
  2. Run the optimizer

    Terminal window
    npx astro-starlight-docs-template init
  3. Build and deploy

    Terminal window
    npm run build
  • Analytics — Google Analytics 4 with Consent Mode v2
  • Privacy — GDPR cookie consent with regional detection
  • SEO — Open Graph, Twitter Cards, Schema.org structured data
  • AI Ready — LLM optimization via llms.txt
  • API Docs — OpenAPI/Swagger spec embedding New
  • Diagrams — Mermaid flowcharts, sequence diagrams, and more New
  • Blog — Blog section alongside your documentation New
  • Image Zoom — Click-to-zoom on any image New
  • Custom Footer — With cookie settings and privacy notice
  • Zero Breaking Changes — No component overrides that break layouts
FeatureManual SetupThis Tool
Time Required4-6 hours2 minutes
GDPR ComplianceResearch requiredBuilt-in
Consent Mode v2Complex setupAutomatic
OpenAPI DocsSeparate toolIntegrated
Mermaid DiagramsPlugin researchPre-configured
BlogCustom setupReady to go
MaintenanceYour responsibilitynpm updates