Quick Start
Get your docs site live in under 10 minutes.
Prerequisites
- Node.js 18 or higher
- A Cloudflare account (free)
- A GitHub account
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:
- Log in to the Cloudflare dashboard
- Go to Workers & Pages → Create application → Pages
- Connect your GitHub repo
- Set build settings:
- Build command:
npm run build - Build output directory:
dist
- Build command:
- 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