Skip to content

Getting Started

Welcome to the documentation site template. This guide walks you through the initial setup so you can start writing and publishing documentation right away.

  • Node.js 18+ (LTS recommended)
  • npm 9+ (ships with Node.js)
  • A code editor (VS Code with the Astro extension recommended)

Clone or fork this repository, then install dependencies:

Terminal window
git clone https://github.com/your-org/documentation-site.git
cd documentation-site
npm install
Terminal window
npm run dev

Open http://localhost:4321 in your browser. The dev server supports hot module replacement — changes to content and components appear instantly.

src/
content/docs/ # Markdown/MDX documentation pages
components/ # Reusable Astro and interactive components
layouts/ # Page layout templates
lib/ # Utility modules (Supabase client, helpers)
pages/ # File-based routes (home page)
public/ # Static assets (images, fonts, favicon)
supabase/ # Database migrations and seed data
astro.config.mjs # Astro + Starlight configuration

Copy .env.example to .env and fill in the values:

Terminal window
cp .env.example .env
VariableRequiredDescription
SITE_URLNoCanonical URL for SEO and sitemaps
PUBLIC_SUPABASE_URLNoSupabase project URL (enables feedback + search)
PUBLIC_SUPABASE_ANON_KEYNoSupabase anonymous key for client-side access

The site works without Supabase — feedback and search features gracefully degrade when credentials are absent.

Terminal window
npm run build

The static output lands in dist/. Preview it locally:

Terminal window
npm run preview