Configuration

Complete reference for docu.json — the site configuration file for DocuBook Flame.

Flame reads project configuration from docu.json at the project root. This file controls site metadata, navigation, theming, plugins, and more.

json
{
  "$schema": "https://raw.githubusercontent.com/DocuBook/docubook/main/packages/flame/docu.schema.json",
  "meta": {
    "title": "My Docs",
    "description": "Documentation powered by DocuBook Flame",
    "baseURL": "https://example.com"
  },
  "navbar": {
    "logoText": "My Docs",
    "menu": [
      { "title": "Home", "href": "/" },
      { "title": "Docs", "href": "/docs" }
    ]
  },
  "themes": {
    "colors": "default"
  }
}

Root Fields

FieldTypeRequiredDescription
$schemastringNoJSON Schema URL for IDE autocompletion
metaobjectYesSite metadata
navbarobjectYesNavigation bar configuration
footerobjectNoFooter configuration
homeobjectNoLanding page hero and features (ignored under experimental.pages)
repoobjectNoRepository link for edit-on-GitHub
sidebarobjectNoSidebar behavior options
routesarrayNoManual route table overrides
themesobjectNoTheme color configuration
pluginsarrayNoPlugin list
experimentalobjectNoOpt-in features that may still change

meta

Site-wide metadata used for page <title>, <meta name="description">, Open Graph tags, and the RSS feed URL.

json
{
  "meta": {
    "title": "My Docs",
    "description": "Documentation powered by DocuBook Flame",
    "baseURL": "https://example.com",
    "favicon": "/docs/assets/images/favicon.ico"
  }
}
FieldTypeRequiredDescription
titlestringYesSite title, used as <title> suffix
descriptionstringNoSite description for SEO
baseURLstringNoOrigin plus deployment root of the site, e.g. https://book.acme.dev or https://acme.github.io/repo for a GitHub Pages project site. Used to build canonical and Open Graph URLs (and by plugins that need absolute URLs), and its pathname (/repo) is the prefix the host serves the dist under
basePathstringNoURL prefix the docs site is served under inside the deployment root (default: /docs). Empty string "" serves the docs from the deployment root
faviconstringNoPath to favicon (default: /docs/assets/images/favicon.ico)
ogImagestringNoGlobal fallback OG image URL for social sharing (per-page override via frontmatter image field). To generate a card for every page instead, see Social Images
verificationobjectNoSite-verification <meta> tags for every page Flame builds, keyed by meta name. See Site verification

Site verification

Services such as the Algolia Crawler or Google Search Console confirm that you own a domain by looking for a <meta> tag on your site. List each tag under meta.verification, with the meta name as the key and the token as the value:

json
{
  "meta": {
    "title": "My Docs",
    "baseURL": "https://example.com",
    "verification": {
      "algolia-site-verification": "ADCCB4B3D3A8BDCE",
      "google-site-verification": "your-google-token"
    }
  }
}

Flame writes each entry into the <head> of every page it builds: the landing page, the docs pages, and the 404 page. The first entry above becomes:

html
<meta name="algolia-site-verification" content="ADCCB4B3D3A8BDCE">

The tag is in the static HTML, so a crawler finds it without running JavaScript. With experimental.pages Flame builds no landing page: if your own app serves the home page, add the tag there, or give the service the URL of a docs page (Algolia calls it Optional URL).

Base path

basePath controls where the docs live — in the build output, in the URL, and in every generated link, canonical tag, search record and nginx location block. baseURL is a separate concern: it is the origin plus the deployment root the artifact is published under.

json
{
  "meta": {
    "title": "Acme Docs",
    "baseURL": "https://acme.github.io/handbook",
    "basePath": "/docs"
  }
}

That configuration serves the docs at https://acme.github.io/handbook/docs/… and writes pages to .docu/dist/docs/…. Setting "basePath": "" serves them at https://acme.github.io/handbook/… and writes them to the dist root.

Non-canonical values (/Docs, /docs me, /docs//guide) are normalized by the build, which logs a warning naming the canonical form. A non-string value fails the build. Full rules and worked hosting examples: Base Path & Subpaths.

Controls the top navigation bar.

json
{
  "navbar": {
    "logoText": "My Docs",
    "logo": {
      "src": "/docs/assets/images/logo.svg",
      "alt": "My Docs"
    },
    "menu": [
      { "title": "Home", "href": "/" },
      { "title": "Docs", "href": "/docs" }
    ]
  }
}
FieldTypeRequiredDescription
logoTextstringYesText displayed next to the logo
logoobjectNoLogo image (src + alt). Replaces logoText when set.
menuarrayNoTop navigation links. Each item has title and href.

The logo is also the mascot of the generated 404 page, gently animated (still for visitors who prefer reduced motion). Without a logo, the 404 page shows a small built-in illustration instead.

Social links displayed in the site footer.

json
{
  "footer": {
    "social": [
      { "name": "github", "url": "https://github.com/DocuBook/docubook" },
      { "name": "npm", "url": "https://www.npmjs.com/package/@docubook/flame" }
    ]
  }
}

Supported social platform names: github, gitlab, bitbucket, npm, youtube, twitter, x, instagram, linkedin, facebook, telegram, discord, threads, mastodon.

repo

Enables the Edit on GitHub link on documentation pages.

json
{
  "repo": {
    "url": "https://github.com/DocuBook/docubook",
    "path": "packages/flame/docs",
    "edit": true
  }
}
FieldTypeRequiredDescription
urlstringYesRepository URL
pathstringYesPath prefix for edit links
editbooleanYesShow edit button on pages

home

Customise the landing page hero section and feature cards. The section is ignored when experimental.pages is on — the landing page is then yours to build, and the build logs a warning while home is still present.

json
{
  "home": {
    "hero": {
      "tagline": "Modern Documentation",
      "headline": "Write docs in MDX",
      "description": "A blazing-fast React + MDX framework.",
      "actions": [
        { "text": "Get Started", "link": "/docs", "theme": "primary" },
        { "text": "GitHub", "link": "https://github.com", "theme": "secondary" }
      ]
    },
    "features": [
      {
        "icon": "Zap",
        "title": "Fast by default",
        "description": "Built on Bun with instant startup."
      }
    ]
  }
}

Hero

FieldTypeDescription
taglinestringSmall text above headline
headlinestringMain heading
descriptionstringSubtitle text
actionsarrayCall-to-action buttons. Each has text, link, optional theme (primary/secondary/ghost), and optional icon.

Feature

FieldTypeDescription
iconstringLucide icon name
titlestringFeature title
descriptionstringFeature description
linkstringOptional link target

Controls how context sections appear in the sidebar.

json
{
  "sidebar": {
    "context": "separator"
  }
}
FieldTypeDefaultDescription
contextstring"dropdown"How multi-context is displayed. "dropdown" — context switcher dropdown. "separator" — inline group headers in sidebar.

routes

Routes define the sidebar navigation tree. When omitted, Flame auto-generates routes from the filesystem (docs/ folder).

json
{
  "routes": [
    {
      "title": "Getting Started",
      "href": "/getting-started",
      "noLink": true,
      "context": { "title": "Guide", "icon": "BookOpen" },
      "items": [
        { "title": "Introduction", "href": "/introduction" },
        { "title": "Installation", "href": "/installation" }
      ]
    }
  ]
}

Each href is relative to its parent: the sidebar joins them from the top-level route down and puts the docs prefix (meta.basePath) in front. In the example above, Introduction links to /docs/getting-started/introduction and must be backed by docs/getting-started/introduction.mdx. Do not repeat the parent path or the /docs prefix in a child href — /docs/getting-started/introduction would become /docs/docs/getting-started/docs/getting-started/introduction.

flame build and flame dev warn about every entry that links to a page with no source in docs/, for example after a page was renamed or deleted, and list it with its sidebar trail:

text
⚠ docu.json "routes" links to 1 page(s) with no source in docs/ — the sidebar link will 404:
    /guide/routing  (Guide › Routing)
  Add the page, or fix or remove the entry in docu.json.

noLink sections are not checked themselves, only their items. With sidebar.context: "separator", sections that have a context are group headers, so only their items are checked.

An entry may also link outside the docs: an href with a scheme (https://, mailto:) or starting with // is linked as written, without the parent path or prefix. A docs href can carry a #fragment or ?query, which stays after .html (/configuration#meta links to /docs/getting-started/configuration.html#meta). Neither is checked as a page, and pagination and the context switcher skip external entries and count a fragment link as its page.

FieldTypeDescription
titlestringSection or page title
hrefstringPath relative to the parent route (top-level: relative to the docs prefix)
noLinkbooleanIf true, the item is a group header (not clickable)
itemsarrayNested child routes
contextobjectContext metadata: title, icon (Lucide name), description

themes

Controls the color system. See Theme Colors for full documentation.

json
{
  "themes": {
    "colors": "default"
  }
}
FieldTypeDescription
colorsstring or objectPreset name ("default", "freshlime", "coffee") or custom { "primary": "#FF5733" }

Override via CLI: flame dev --theme freshlime, flame build --theme coffee.

plugins

Extend Flame with build and dev server hooks. See Plugins for the full API.

json
{
  "plugins": [
    "@docubook/plugin-sitemap",
    ["./plugins/analytics", { "id": "G-XXXXXXX" }]
  ]
}

Each entry is a plugin name (npm package or relative path) optionally followed by an options object. Relative paths starting with . resolve from the project root; absolute paths and .. traversal are blocked.

experimental

For a step-by-step experimental.pages setup, see Bring Your Own Pages, then choose a framework and deployment target from that guide.

Opt-in features whose behavior may still change between minor releases. Nothing here is on by default.

json
{
  "experimental": {
    "pages": true
  }
}
FieldTypeDefaultDescription
pagesbooleanfalseBring your own landing page. Flame then keeps everything it builds under meta.basePath: no landing page or landing bundle, the 404 page at <basePath>/404.html, and bundles plus the search index at <basePath>/_flame/. home is ignored. See Bring your own pages.

With pages off, nothing changes: the generated landing page and root 404 keep shipping, bundles stay in the dist-root assets/, and home keeps rendering.

Use pages with a docs prefix. A root meta.basePath ("" or "/") makes the docs own / and the root index.html and 404.html, so they cannot share the origin with another app. The schema flags that combination, and the build and dev server print a warning.

Last updated Nov 7, 2026