A sleek and modern documentation site template built with Astro, Svelte, and Tailwind CSS. Features a clean design, full-text search, dark mode support, and responsive layout.
- π Built with Astro - Fast, modern static site generation
- β‘οΈ Svelte Components - Interactive UI components with great DX
- π¨ Tailwind CSS - Utility-first CSS framework
- π MDX Support - Write content in MDX with component support
- π Full-text Search - Fast client-side search with Fuse.js
- π Dark Mode - Elegant light and dark theme support
- π± Responsive Design - Mobile-first, adaptive layout
- π§© Auto-generated Navigation - Sidebar structure from content
- π― Priority-based Ordering - Fine-grained control over navigation order
- π Group Ordering - Define navigation group order in config
# Clone the repository
git clone https://github.com/appwrite/template-for-documentation.git
# Navigate to the project
cd docs-template
# Install dependencies
npm install
# Start development server
npm run dev.
βββ public/
βββ src/
β   βββ assets/
β   βββ components/
β   βββ content/
β   β   βββ docs/
β   β   βββ config.ts
β   βββ layouts/
β   βββ pages/
β   βββ styles/
βββ astro.config.mjs
βββ package.json
βββ tsconfig.json
Add your documentation content in MDX format under src/content/docs/:
---
title: Getting Started
description: Learn how to use our product
group: Overview
priority: 2
---
# Getting Started
Welcome to our documentation...The sidebar navigation is automatically generated from your content structure. The order of navigation groups is defined in src/content/config.ts:
// Define groups in desired order
const groups = ['Overview', 'Foundations', 'Components'] as const;
const docs = defineCollection({
	type: 'content',
	schema: z.object({
		title: z.string(),
		description: z.string(),
		group: z.enum(groups).optional(), // Groups will appear in the order defined above
		order: z.number().optional(),
		priority: z.number().optional()
	})
});Each MDX file can include these frontmatter fields:
| Field | Type | Required | Description | 
|---|---|---|---|
| title | string | Yes | Page title | 
| description | string | Yes | Page description | 
| group | enum | No | Navigation group (must match config.ts groups) | 
| priority | number | No | Navigation order priority (higher = earlier) | 
The priority field gives you fine-grained control over page order within groups:
---
title: Home
group: Overview
priority: 1 # Appears first
---
---
title: Getting Started
group: Overview
priority: 2 # Appears second
---
---
title: Design Tokens
group: Overview
priority: 3 # Appears third
---If priority is not set, items are sorted alphabetically by title.
Groups appear in the order they're defined in config.ts. To change the order of navigation groups:
- Update the groupsarray insrc/content/config.ts
- The sidebar will automatically reflect the new order
- TypeScript ensures group names in MDX files match the config
Customize colors, typography, and other design tokens in tailwind.config.mjs:
theme: {
	extend: {
		colors: {
			primary: {
				// Your color palette
			}
		}
	}
}Add or modify components in src/components/. The template uses Svelte for interactive components and Astro for page layout.
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewMIT License - feel free to use this template for your own documentation needs.