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.
Prerequisites
Section titled “Prerequisites”- Node.js 18+ (LTS recommended)
- npm 9+ (ships with Node.js)
- A code editor (VS Code with the Astro extension recommended)
Installation
Section titled “Installation”Clone or fork this repository, then install dependencies:
git clone https://github.com/your-org/documentation-site.gitcd documentation-sitenpm installStart the development server
Section titled “Start the development server”npm run devOpen http://localhost:4321 in your browser. The dev server supports hot module replacement — changes to content and components appear instantly.
Project structure
Section titled “Project structure”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 dataastro.config.mjs # Astro + Starlight configurationConfiguration
Section titled “Configuration”Copy .env.example to .env and fill in the values:
cp .env.example .env| Variable | Required | Description |
|---|---|---|
SITE_URL | No | Canonical URL for SEO and sitemaps |
PUBLIC_SUPABASE_URL | No | Supabase project URL (enables feedback + search) |
PUBLIC_SUPABASE_ANON_KEY | No | Supabase anonymous key for client-side access |
The site works without Supabase — feedback and search features gracefully degrade when credentials are absent.
Build for production
Section titled “Build for production”npm run buildThe static output lands in dist/. Preview it locally:
npm run previewNext steps
Section titled “Next steps”- Writing Content — Learn Markdown/MDX authoring conventions
- Customization — Theme, sidebar, and branding
- Deployment — Ship to Vercel, Netlify, or Docker
- Configuration Reference — All settings explained