Configuration Reference
Docboot requires zero configuration by default. When customization is needed, create a docboot.config.js file in your project root.
1. Site Metadata & Paths #
export default {
title: "My Project Documentation",
description: "High-performance developer documentation",
docs: "./docs", // Source directory (default: "./docs" or ".")
out: "./dist", // Output directory (default: "./dist")
repo: "https://github.com/org/my-project" // Repository link for header
};
| Option | Type | Default | Description |
|---|---|---|---|
title | string | "Documentation" | Website title in header and metadata |
description | string | "" | Global fallback SEO meta description |
docs | string | "./docs" | Path to Markdown source folder |
out | string | "./dist" | Output directory for static build |
repo | string | "" | GitHub repository URL |
2. Navigation & Source Links #
export default {
editLink: {
pattern: "https://github.com/org/my-project/edit/main/docs/:path",
text: "Edit this page on GitHub"
},
sourceLink: {
pattern: "https://github.com/org/my-project/blob/main/docs/:path",
text: "View source"
}
};
| Option | Type | Default | Description |
|---|---|---|---|
editLink.pattern | string | null | URL template for "Edit this page on GitHub" link |
editLink.text | string | "Edit this page on GitHub" | Display text for the link |
sourceLink.pattern | string | null | URL template for "View source" link |
sourceLink.text | string | "View source" | Display text for the link |
3. Theme & Typography Controls #
export default {
theme: {
preset: "zinc", // "zinc" | "ocean" | "emerald" | "violet" | "amber" | "rose"
defaultMode: "system", // "system" | "dark" | "light"
themeToggle: true, // Show light/dark mode icon
presetMenu: true, // Show theme & font customizer menu
fontSizeControl: true // Show A- / A+ reading font size stepper
}
};
| Option | Type | Default | Description |
|---|---|---|---|
theme.preset | string | "zinc" | Accent color palette |
theme.defaultMode | string | "system" | Default theme mode on first visit |
theme.themeToggle | boolean | true | Show dark/light mode toggle button in header |
theme.presetMenu | boolean | true | Show palette switcher & typography dropdown |
theme.fontSizeControl | boolean | true | Show text scaling A- / A+ buttons |
4. Local Search #
export default {
search: {
fuzzy: 0.2, // Fuzzy matching threshold (0 = exact, 0.2 = default)
prefix: true, // Match prefix substrings while typing
maxResults: 10, // Maximum number of visible results in modal
minQueryLength: 2 // Minimum characters before executing search
}
};
5. Rich Content & Embeds #
export default {
embeds: {
allowedDomains: [
"youtube.com",
"codesandbox.io",
"stackblitz.com",
"codepen.io",
"vimeo.com"
]
}
};
6. Hosting & SEO Base Path #
export default {
base: "/my-project/", // Custom base path (e.g. GitHub Pages repo name)
customDomain: "docs.example.com" // Generates dist/CNAME file
};
7. Analytics #
export default {
analytics: {
google: { id: "G-XXXXXXXXXX" },
plausible: { domain: "docs.example.com", apiHost: "https://plausible.io" },
umami: { websiteId: "xxxx-xxxx", src: "https://analytics.umami.is/script.js" },
fathom: { siteId: "XXXXXX" },
clarity: { id: "XXXXXXXXXX" },
custom: `<script defer src="https://my-cdn.com/analytics.js"></script>`
}
};
8. Progressive Web App (PWA) #
export default {
pwa: true // Generates manifest.webmanifest and sw.js for offline reading
};
9. Page Provenance & Footer #
Docboot automatically infers Git creation dates, last update dates, and GitHub edit URLs at build time without requiring manual date maintenance.
export default {
footer: {
pageMeta: true, // Enable page-level metadata footer
created: true, // Show page initial introduction date (from Git or frontmatter)
updated: true, // Show page last modified date (from Git or frontmatter)
editLink: true, // Automatic "Edit this page" link
version: true, // Show Docboot version in site footer
commit: false, // Show short commit SHA in site footer
buildDuration: false, // Show compilation duration in site footer
branding: true, // Show "Built with Docboot" branding
links: [
{ label: "GitHub", href: "https://github.com/litepacks/docboot" },
{ label: "npm", href: "https://www.npmjs.com/package/docboot" }
]
}
};
Frontmatter Overrides #
You can override Git-inferred provenance explicitly in any Markdown file's frontmatter:
---
title: State Management
created: 2026-08-12
updated: 2026-08-29
editLink: false
---
10. Static Route Redirects & Aliases #
Docboot provides build-time static redirect and alias resolution with zero-runtime router overhead.
export default {
redirects: {
"/old-api": "/reference/api",
"/guide/install": "/getting-started/installation",
"/config": "/reference/configuration",
"/docs/search": "/guide/search#configuration",
"/legacy-site": "https://legacy.example.com"
}
};
Frontmatter Aliases & Redirects #
Declare discoverable route aliases and legacy redirect sources at the individual page level:
---
title: Build Cache
aliases:
- /cache
- /incremental-cache
redirectFrom:
- /legacy-cache-v1
keywords:
- caching
- multi-tier
---
Next Steps #
- Redirects & Aliases Guide — Full guide and static hosting details
- CLI Reference — CLI commands and flags
- Directives Reference — Markdown extensions
- Docboot Doctor — Validating project configuration and redirect graphs