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 #

docboot.config.js
JAVASCRIPT
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
};
OptionTypeDefaultDescription
titlestring"Documentation"Website title in header and metadata
descriptionstring""Global fallback SEO meta description
docsstring"./docs"Path to Markdown source folder
outstring"./dist"Output directory for static build
repostring""GitHub repository URL

docboot.config.js
JAVASCRIPT
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"
  }
};
OptionTypeDefaultDescription
editLink.patternstringnullURL template for "Edit this page on GitHub" link
editLink.textstring"Edit this page on GitHub"Display text for the link
sourceLink.patternstringnullURL template for "View source" link
sourceLink.textstring"View source"Display text for the link

3. Theme & Typography Controls #

docboot.config.js
JAVASCRIPT
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
  }
};
OptionTypeDefaultDescription
theme.presetstring"zinc"Accent color palette
theme.defaultModestring"system"Default theme mode on first visit
theme.themeTogglebooleantrueShow dark/light mode toggle button in header
theme.presetMenubooleantrueShow palette switcher & typography dropdown
theme.fontSizeControlbooleantrueShow text scaling A- / A+ buttons

docboot.config.js
JAVASCRIPT
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 #

docboot.config.js
JAVASCRIPT
export default {
  embeds: {
    allowedDomains: [
      "youtube.com",
      "codesandbox.io",
      "stackblitz.com",
      "codepen.io",
      "vimeo.com"
    ]
  }
};

6. Hosting & SEO Base Path #

docboot.config.js
JAVASCRIPT
export default {
  base: "/my-project/",              // Custom base path (e.g. GitHub Pages repo name)
  customDomain: "docs.example.com"   // Generates dist/CNAME file
};

7. Analytics #

docboot.config.js
JAVASCRIPT
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) #

docboot.config.js
JAVASCRIPT
export default {
  pwa: true // Generates manifest.webmanifest and sw.js for offline reading
};

Docboot automatically infers Git creation dates, last update dates, and GitHub edit URLs at build time without requiring manual date maintenance.

docboot.config.js
JAVASCRIPT
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:

MARKDOWN
---
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.

docboot.config.js
JAVASCRIPT
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:

docs/tooling/build-cache.md
MARKDOWN
---
title: Build Cache
aliases:
  - /cache
  - /incremental-cache
redirectFrom:
  - /legacy-cache-v1
keywords:
  - caching
  - multi-tier
---

Next Steps #

3 min read · Updated