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.
{
"$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
| Field | Type | Required | Description |
|---|
$schema | string | No | JSON Schema URL for IDE autocompletion |
meta | object | Yes | Site metadata |
navbar | object | Yes | Navigation bar configuration |
footer | object | No | Footer configuration |
home | object | No | Landing page hero and features (ignored under experimental.pages) |
repo | object | No | Repository link for edit-on-GitHub |
sidebar | object | No | Sidebar behavior options |
routes | array | No | Manual route table overrides |
themes | object | No | Theme color configuration |
plugins | array | No | Plugin list |
experimental | object | No | Opt-in features that may still change |
Site-wide metadata used for page <title>, <meta name="description">, Open Graph tags, and the RSS feed URL.
{
"meta": {
"title": "My Docs",
"description": "Documentation powered by DocuBook Flame",
"baseURL": "https://example.com",
"favicon": "/docs/assets/images/favicon.ico"
}
}
| Field | Type | Required | Description |
|---|
title | string | Yes | Site title, used as <title> suffix |
description | string | No | Site description for SEO |
baseURL | string | No | Origin 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 |
basePath | string | No | URL prefix the docs site is served under inside the deployment root (default: /docs). Empty string "" serves the docs from the deployment root |
favicon | string | No | Path to favicon (default: /docs/assets/images/favicon.ico) |
ogImage | string | No | Global 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 |
verification | object | No | Site-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:
{
"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:
<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.
{
"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.
navbar
Controls the top navigation bar.
{
"navbar": {
"logoText": "My Docs",
"logo": {
"src": "/docs/assets/images/logo.svg",
"alt": "My Docs"
},
"menu": [
{ "title": "Home", "href": "/" },
{ "title": "Docs", "href": "/docs" }
]
}
}
| Field | Type | Required | Description |
|---|
logoText | string | Yes | Text displayed next to the logo |
logo | object | No | Logo image (src + alt). Replaces logoText when set. |
menu | array | No | Top 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.
{
"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.
{
"repo": {
"url": "https://github.com/DocuBook/docubook",
"path": "packages/flame/docs",
"edit": true
}
}
| Field | Type | Required | Description |
|---|
url | string | Yes | Repository URL |
path | string | Yes | Path prefix for edit links |
edit | boolean | Yes | Show 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.
{
"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
| Field | Type | Description |
|---|
tagline | string | Small text above headline |
headline | string | Main heading |
description | string | Subtitle text |
actions | array | Call-to-action buttons. Each has text, link, optional theme (primary/secondary/ghost), and optional icon. |
Feature
| Field | Type | Description |
|---|
icon | string | Lucide icon name |
title | string | Feature title |
description | string | Feature description |
link | string | Optional link target |
Controls how context sections appear in the sidebar.
{
"sidebar": {
"context": "separator"
}
}
| Field | Type | Default | Description |
|---|
context | string | "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).
{
"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:
⚠ 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.
| Field | Type | Description |
|---|
title | string | Section or page title |
href | string | Path relative to the parent route (top-level: relative to the docs prefix) |
noLink | boolean | If true, the item is a group header (not clickable) |
items | array | Nested child routes |
context | object | Context metadata: title, icon (Lucide name), description |
themes
Controls the color system. See Theme Colors for full documentation.
{
"themes": {
"colors": "default"
}
}
| Field | Type | Description |
|---|
colors | string or object | Preset 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.
{
"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.
{
"experimental": {
"pages": true
}
}
| Field | Type | Default | Description |
|---|
pages | boolean | false | Bring 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.