Dune for Developers
Build custom themes, extend Dune with plugins and format handlers, and integrate via the REST API or CLI.
Your learning path
1. Understand the system
Installation — install Deno and Dune
Project Structure — content, themes, config layout
Programmatic Config — configure Dune in TypeScript
2. Build themes
Templates — Preact TSX templates and template props
Theme Inheritance — extend and override themes
Creating a Theme — from scratch
Islands — client-side interactivity in SSR pages
3. Extend Dune
Hooks — lifecycle hooks for content and routing
Format Handlers — add new content formats
MDX Content — JSX inside Markdown
Plugins — packaging and distributing extensions
Email — transactional email via email.send() with SMTP, Resend, Postmark, or SendGrid
Payments — Stripe checkout, webhooks, and billing portal
3a. Build data-driven features
Data Layer — schema-first data modelling, Repository API, KV/SQLite/PostgreSQL adapters, migrations
UI Components — @dune/core/ui Preact components for search, auth, profiles, and payments
3b. Add user authentication
Authentication — public site user auth overview
Public Auth — OAuth (GitHub, Google, Discord), magic links, external JWT
Content Gating — role-based page access, redirect and 403 behaviour
3c. Control access (authorization)
Authorization — polizy-backed authz, createDuneAuthSystem, authz.check(), route middleware, external-JWT + local authz mode
4. Work with AI agents
AI Agent Integration — llms.txt, skill files, MCP server, and the change API
MCP Server — live content and config context over the Model Context Protocol
5. Go headless (optional)
Headless Mode — Fresh developer owns all routes; Dune manages content and admindune new my-site --headless to scaffold a headless project
6. Deploy and integrate
Deno Deploy — zero-config cloud deployment
Static Site Generation — build to static HTML
REST API — content and search API endpoints
CLI Commands — dune serve, dune build, dune new
7. Reference
Config Schema — full configuration reference
Search — search engine API and index format
API Stability — what's stable, what may change
Use the sidebar filter to keep only developer-relevant pages visible as you navigate.