Prompy
ziedalsnoussi@ziedalsnoussiupdated 4d agoPublic

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.

prompt.md · 2477 chars · 1 variables

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:

  1. Check the repository structure to determine if it's a monorepo or single-app repository.
  2. Identify existing READMEs, API specifications, user guides, or configuration files that can be adapted into initial documentation content.
  3. Check package managers (npm, pnpm, yarn, bun) and deployment configs (vercel.json or turbo/nx configs).

Step 2: Implementation Tasks

  1. Initialize Astro Starlight (docs/ directory):

    • Create a new Astro project using Starlight (npx astro@latest add starlight or manual setup inside docs/).
    • Configure astro.config.mjs with site title, social links (GitHub, etc.), custom styling/accent colors, and localized routing if needed.
  2. 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/ or architecture/: Document key features, tech stack components, and database/API schemas.
    • api/ or reference/: Reference core endpoints or SDK methods.
  3. Configure Sidebar Navigation (astro.config.mjs):

    • Organize sidebar categories logically (e.g., Start Here, Guides, Architecture, API Reference).
  4. 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.json or root Vercel project configuration for the docs workspace).
    • Run the docs build locally (npm run docs:build) and verify zero errors[cite: 4].

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.

    Chosen by shared tags, then similar wording.