Quick Start

Get your docs site live in under 10 minutes.

Prerequisites

1. Clone and install

git clone https://github.com/your-org/your-docs-site
cd your-docs-site
npm install

2. Run locally

npm run dev

Your site will be available at http://localhost:4321.

3. Add your content

Create .md files in src/pages/docs/. Each file needs a frontmatter block:

---
layout: ../../layouts/BaseLayout.astro
title: Your Page Title
description: SEO description here.
---

# Your Page Title

Your content here...

4. Deploy to Cloudflare Pages

Push your repo to GitHub, then:

  1. Log in to the Cloudflare dashboard
  2. Go to Workers & Pages → Create application → Pages
  3. Connect your GitHub repo
  4. Set build settings:
    • Build command: npm run build
    • Build output directory: dist
  5. Click Save and Deploy

That’s it. Your docs are live on Cloudflare’s global CDN — for free.

Sequence example

sequenceDiagram participant Dev as Developer participant GH as GitHub participant CF as Cloudflare Pages

Dev->>GH: git push GH->>CF: Webhook trigger CF->>CF: npm run build CF—>>Dev: Site deployed ✓

File structure

docs-site/
├── src/
│   ├── layouts/
│   │   └── BaseLayout.astro    ← Shell layout (nav, sidebar, TOC)
│   └── pages/
│       ├── index.astro          ← Landing page
│       └── docs/
│           ├── introduction.md
│           ├── quick-start.md   ← You are here
│           └── ...              ← Add your pages
├── astro.config.mjs
├── wrangler.toml                ← Cloudflare config
└── package.json