Overview
Everything you need to build, configure, and customize a Boltdocs documentation site — from installation to advanced layout customization.
Boltdocs turns a folder of Markdown files into a fully rendered, search-indexed, and SEO-optimized documentation site. These guides walk you through every layer of the framework — from getting your first page live in two minutes to building fully custom layouts and injecting your own React components into MDX.
Where to Start
Installation
Get Boltdocs running in under two minutes using create-boltdocs or manual setup.
Configuration
A guided tour of every key in boltdocs.config.ts and what it controls.
File-System Routing
Understand how your docs/ folder structure maps to routes, sidebar groups, and tab sections.
Frontmatter
Control routing, sidebar display, SEO, and page metadata from any .md or .mdx file.
Project Structure
A freshly scaffolded Boltdocs project looks like this:
my-docs/
├── docs/ # All your content lives here
│ ├── (guides)/
│ │ └── index.mdx
│ └── index.md # Root page → /docs
├── public/ # Static assets (images, fonts, favicons)
│ ├── dark.svg
│ └── light.svg
├── src/
│ └── components/ # Your custom React components
├── boltdocs.config.ts # The brain of your docs site
├── index.html # Vite HTML entry point
├── index.css # Global styles
└── package.json
Key Directories
docs/ — Everything here becomes a page. Boltdocs recursively scans for .md and .mdx files and turns them into routes. The folder structure maps directly to the URL structure.
boltdocs.config.ts — The single source of truth. Controls theme, navigation, plugins, SEO, i18n, and more. Boltdocs generates the full Vite configuration internally — no separate vite.config.ts needed.
public/ — Static assets served at your site root. Reference them in Markdown with a root-relative path like /my-image.png.
src/components/ — Your custom React components, available for import in .mdx files or registration as global MDX components via plugins.
| Optional File | Purpose |
|---|---|
docs/layout.tsx | Custom docs layout wrapping all pages |
docs/**/meta.json | Override sidebar group titles, icons, and ordering per directory |
doctor.json | Config for the boltdocs doctor link checker |
Boltdocs generates the entire Vite configuration from boltdocs.config.ts. To extend Vite (e.g., add a custom plugin), use the vite key inside defineConfig or write a Boltdocs plugin that exposes vitePlugins.
All Guides
Installation
Install and run your first docs site.
Configuration
Full walkthrough of boltdocs.config.ts.
File-System Routing
Routing, sidebar groups, tabs, and ordering.
Custom Layout
Override the default layout with your own React component.
External Pages
Register non-MDX React pages into the Boltdocs router.
MDX Injection
Add custom React components globally to your MDX pipeline.
Frontmatter
Full frontmatter field reference.
Meta Loaders
Control sidebar groups with meta.json.
Custom Icons
Use Lucide icons or raw SVGs throughout your site.
Custom Themes
Build custom color palettes and styling variables with reset.css.
Cache & Environment
How caching works and the .env variables that control it.