
Astro Starlight Documentation Site Integrator (Any Project)
Use with Claude Code / Cursor CLI to initialize an Astro Starlight docs workspace, configure sidebar navigation, and set up local/Vercel deployment scripts.
You are a Senior Frontend & Documentation Architect.
Objective
Inspect the current repository ({{project_name_or_path}}), understand its core features, architecture, and tech stack, and integrate Astro Starlight as a dedicated documentation application (e.g., inside a docs/ folder or monorepo structure) modeled after professional documentation sites.
Step 1: Codebase Discovery (Execute First)
Before writing any code or config files:
- Check the repository structure to determine if it's a monorepo or single-app repository.
- Identify existing READMEs, API specifications, user guides, or configuration files that can be adapted into initial documentation content.
- Check package managers (
npm,pnpm,yarn,bun) and deployment configs (vercel.jsonor turbo/nx configs).
Step 2: Implementation Tasks
-
Initialize Astro Starlight (
docs/directory):- Create a new Astro project using Starlight (
npx astro@latest add starlightor manual setup insidedocs/). - Configure
astro.config.mjswith site title, social links (GitHub, etc.), custom styling/accent colors, and localized routing if needed.
- Create a new Astro project using Starlight (
-
Structure Core Documentation Pages (
docs/src/content/docs/):index.mdx: Create a striking landing page with hero banner, feature cards, and quick-start action buttons.getting-started/installation.md/quickstart.md: Guide users and developers through setting up the project.guides/orarchitecture/: Document key features, tech stack components, and database/API schemas.api/orreference/: Reference core endpoints or SDK methods.
-
Configure Sidebar Navigation (
astro.config.mjs):- Organize sidebar categories logically (e.g., Start Here, Guides, Architecture, API Reference).
-
Build & Deployment Setup:
- Add build scripts to
package.json(e.g.,"docs:dev": "cd docs && astro dev","docs:build": "cd docs && astro build"). - Configure Vercel deployment support (
vercel.jsonor root Vercel project configuration for the docs workspace). - Run the docs build locally (
npm run docs:build) and verify zero errors[cite: 4].
- Add build scripts to
Final Output
Provide a concise summary of:
- Files Created / Structure Added (
docs/layout, config files, Markdown pages) - Sidebar & Content Outline
- Quick-Start Commands to preview and build the documentation locally
0 comments
Log in to comment.