docs.json and page format reference
Manifest keys, navigation node types, theme keys, page frontmatter, page types, components and lint rules for local Doxbrix docs projects.
Use this page to look up the format of a local Doxbrix docs project: the docs.json manifest, the page files it references, the frontmatter each page carries, and the checks that dxb lint and dxb docs check run against them.
You work with this format when you author docs locally with the dxb CLI or keep a project in a Git repository with Git sync. Git sync reads and writes the same manifest shape.
Project layout
A local docs project has three kinds of files:
| File | Purpose | Commit it? |
|---|---|---|
docs.json | The manifest. It defines spaces, navigation, versions and theme. Navigation comes only from this file. | Yes |
Page files (.mdx, .md, .markdown) | Page content with YAML frontmatter. The manifest references each page by path without its extension. | Yes |
.doxbrix/config.json | The project link: projectId, projectSlug and basePath (the docs root relative to the project root; an empty string means the project root). | Yes. It never holds a token. |
dxb init creates this layout. dxb link writes .doxbrix/config.json.
my-docs/
├── .doxbrix/
│ └── config.json
├── docs.json
├── index.mdx
├── quickstart.mdx
└── guides/
└── authentication.mdxComplete example
This docs.json defines one versioned space with groups, a label, a divider, an external link and an API reference node.
{
"version": 1,
"name": "Acme Docs",
"description": "Learn how to integrate with Acme.",
"apiBaseUrl": "https://api.example.com",
"openapiSources": ["openapi.yaml"],
"versions": [
{ "version": "v2", "label": "v2.0", "tag": "Latest", "default": true },
{ "version": "v1", "label": "v1.x" }
],
"spaces": [
{
"name": "Documentation",
"slug": "docs",
"locale": "en",
"icon": "book",
"version": "v2",
"nav": [
{
"type": "group",
"label": "Get started",
"icon": "rocket",
"items": [
{ "type": "page", "file": "index", "title": "Overview", "icon": "compass" },
{ "type": "page", "file": "quickstart", "icon": "bolt" }
]
},
{ "type": "label", "text": "Guides" },
{ "type": "page", "file": "guides/authentication" },
{ "type": "divider" },
{ "type": "link", "title": "Service status", "href": "https://status.example.com", "icon": "globe" },
{ "type": "api", "title": "HTTP API", "spec": "openapi.yaml", "icon": "plug" }
]
}
],
"theme": {
"primaryColor": "#6366f1",
"lightColor": "#4f46e5",
"darkColor": "#818cf8",
"mode": "system",
"font": "Inter",
"codeFont": "JetBrains Mono",
"logoLight": "/assets/logo-light.svg",
"logoDark": "/assets/logo-dark.svg",
"favicon": "/assets/favicon.svg"
}
}Top-level keys
| Key | Type | Required | Description |
|---|---|---|---|
version | number | Yes | Manifest format version. Use 1. |
name | string | No | Project display name. |
description | string | No | Project description. |
openapiSources | string[] | No | Paths to OpenAPI specifications in the project. |
apiBaseUrl | string | No | Base URL for API reference pages. |
versions | object[] | No | Product-docs versions in switcher order. Omit it for an unversioned project. See Versions. |
spaces | object[] | Yes | The project's spaces. See Spaces. |
theme | object | No | Portable brand and layout settings. See Theme. |
site | object | No | Additional site settings as a free-form object. |
Versions
Each entry in versions describes one product-docs version. The first entry is the default unless an entry sets default: true. To learn how readers switch versions, see Version your product documentation.
| Key | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Version slug. Spaces reference it in their version key. |
label | string | No | Display label in the version switcher. |
tag | string | No | Text shown as a badge next to the version. |
default | boolean | No | Marks the default version. |
isDefault | boolean | No | Same as default. Importers emit this form. |
Spaces
A space is a top-level content section with its own navigation tree. For how spaces appear to readers, see Organize spaces, groups and navigation.
| Key | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Space name. |
slug | string | No | URL slug of the space. |
locale | string | No | Locale of the space, for localized docs. |
parent | string | No | Slug of the parent space. |
icon | string | No | Icon name. |
tag | string | No | Tag text for the space. |
version | string | No | Version slug from the versions catalog. Omit it for the default version. |
nav | object[] | Yes | Navigation nodes. See Navigation nodes. |
Navigation nodes
Every node has a type. A group can contain pages, links, labels, dividers, API nodes and nested groups.
| Type | Required keys | Optional keys | Renders as |
|---|---|---|---|
page | file | title, icon, hidden | A page. file is the page path relative to the docs root, without an extension. title overrides the page title in navigation. |
group | label, items | icon, hidden | A collapsible folder of nodes. |
label | text | — | Non-clickable section text. |
divider | — | — | A visual separator. |
link | title, href | icon | An internal or external link. |
api | title, spec | icon | An API reference generated from the specification at spec. |
hidden: true keeps a page or group out of the navigation sidebar.
Theme
All theme keys are optional. Use six-digit hexadecimal colors. Root-relative asset paths, such as /assets/logo-light.svg, resolve from the docs root. For the equivalent settings in the app, see Brand your site and choose a layout.
Colors and mode
| Key | Type | Description |
|---|---|---|
primaryColor | string | Default accent color. |
lightColor | string | Accent color in light mode. |
darkColor | string | Accent color in dark mode. |
mode | light | dark | system | Color mode. |
strictMode | boolean | Strict theme mode flag. |
textColors | object | Text colors per mode: light and dark, each with optional heading, body and muted. |
backgroundColorLight | string | Page background in light mode. |
backgroundColorDark | string | Page background in dark mode. |
backgroundImage | string | Background image path or URL. |
backgroundDecoration | string | Background decoration name. |
source | string | Where the theme came from, set by migrations. |
preset | string | Theme preset name. |
Fonts and typography
| Key | Type | Description |
|---|---|---|
font | string | Body font family. |
headingFont | string | Heading font family. |
codeFont | string | Code font family. |
fontSources | object[] | Local font files. Each entry has family, source, role (body, heading or code) and optional format and weight. |
typography | object | Numeric type-scale overrides: titleWeight, titleSize, titleSizeMobile, titleLineHeight, titleLineHeightMobile, descriptionSize, descriptionLineHeight, bodyWeight, bodySize, bodyLineHeight, headingWeight, h2Size, h2LineHeight, h2MarginTop, h2MarginBottom, the same four keys for h3 and h4, strongWeight and apiFieldWeight. Also fontFeatures (string[]), fontVariationSettings (normal) and fontSmoothing (auto or antialiased). |
Logos, icons and code
| Key | Type | Description |
|---|---|---|
logoLight | string | Logo for light mode. |
logoDark | string | Logo for dark mode. |
logoHref | string | Destination of the logo link. |
favicon | string | Favicon. |
faviconLight | string | Favicon for light mode. |
faviconDark | string | Favicon for dark mode. |
codeTheme | string | Code highlighting theme. |
codeThemeLight | string | Code theme in light mode. |
codeThemeDark | string | Code theme in dark mode. |
eyebrow | string | Eyebrow text style. |
Layout
layout sets shell dimensions as numbers. When you include layout, set all six required keys.
| Key | Type | Required |
|---|---|---|
headerHeight | number | Yes |
sidebarWidth | number | Yes |
tocWidth | number | Yes |
contentMaxWidth | number | Yes |
contentPadding | number | Yes |
navPadding | number | Yes |
tabsHeight | number | No |
shellMaxWidth | number | No |
Page files
Each page is an .mdx, .md or .markdown file with YAML frontmatter followed by Markdown or MDX content.
---
title: Authenticate requests
description: Send an access token with every API request.
pageType: how-to
---
Every request to the Acme API must include an access token.
<Steps>
<Step title="Create a token">Open **Settings** and create a token.</Step>
<Step title="Send the token">Add the `Authorization` header to each request.</Step>
</Steps>Frontmatter
| Key | Type | Description |
|---|---|---|
title | string | Page title, rendered as the page heading. If it is missing, the first H1 is used. |
description | string | Page description. |
slug | string | Overrides the page route. By default the route is the file path without its extension. |
pageType | string | Opts the page into a page contract. page-type and page_type are also accepted. See Page types. |
icon | string | Icon name for the page. |
Because the title renders as the page heading, do not add a Markdown H1 to a page that has a title. Use at most one H1 in any page.
Components
Pages can use these Doxbrix MDX components. dxb lint warns about any other capitalized component tag outside code examples.
Accordion, AccordionGroup, AccordionItem, ApiEndpoint, Audience, Badge, Callout, Card, CardGroup, Check, CodeGroup, CodeTab, ColorGroup, ColorPalette, ColorSwatch, Column, Columns, Danger, Embed, Excalidraw, Expandable, File, FileNode, FileTree, Folder, Frame, Icon, Image, Info, Math, Mermaid, Note, PDF, Param, ParamField, ParameterTable, PromptCard, RequestExample, Response, ResponseExample, ResponseField, SidePanel, Step, Steps, Tab, Tabs, Terminal, Tile, Tip, Tooltip, Update, Video, ViewPane, ViewSwitcher, Warning.
For the equivalent blocks in the browser editor, see Blocks and slash commands reference.
Page types
Set pageType to opt a page into a machine-checkable page contract. dxb new page --type sets it for you. dxb docs check also infers a type from the path or title for untyped pages.
| Value | Contract | Purpose |
|---|---|---|
landing | Landing page | Orient readers, explain the product value, and route them to the right first task. |
quickstart | Quickstart | Take a first-time reader from prerequisites to a verified success quickly. |
how-to | How-to guide | Help a reader complete one defined task safely and verify the result. |
concept | Concept | Build an accurate mental model and connect it to practical product decisions. |
troubleshooting | Troubleshooting | Help readers identify a symptom, understand likely causes, resolve it, and verify recovery. |
rest-api | REST API reference | Specify an HTTP operation or API area precisely enough to integrate and handle failures. |
cli-reference | CLI reference | Specify command syntax, arguments, output, and failures accurately. |
configuration-reference | Configuration reference | Define supported settings, defaults, constraints, and operational effects precisely. |
migration | Migration guide | Move readers between known versions or states without losing data or service continuity. |
release-notes | Release notes | Summarize a dated or versioned release and tell affected readers what action to take. |
code-api | Code API reference | Describe an explicitly selected public function, class, type, or module contract. |
faq | FAQ | Answer recurring reader questions directly and route readers to complete task guidance. |
reference | Reference | Provide precise, scannable facts readers can consult while working. |
A missing contract section is a warning. An unsupported pageType value, or an explicitly typed page with no substantive content, is an error.
Lint rules
dxb lint runs these checks. Errors make the command fail. Warnings fail it only with --strict.
| Rule | Severity | Triggered when |
|---|---|---|
missing-file | Error | A page node's file does not match any page file. |
bad-page | Error | A page node has no file. |
bad-link | Error | A link node has no href. |
bad-api | Error | An api node has no spec. |
starter-page | Error | A page still contains starter content marked with <!-- doxbrix:starter-page -->. Replace it with real content. |
page-contract-invalid-type | Error | pageType is not one of the supported page types. |
page-contract-empty | Error | A page with an explicit pageType has no substantive content. |
page-contract-<type>-<requirement> | Warning | A typed page is missing a section its contract recommends. |
orphan-file | Warning | A page file is not referenced in docs.json. dxb push does not publish orphan files. |
empty-group | Warning | A group has no items. |
duplicate-slug | Warning | Two pages resolve to the same slug. |
missing-title | Warning | A page has no frontmatter title and no H1. |
missing-description | Warning | A page has no frontmatter description. |
h1-count | Warning | A page contains more than one authored H1. |
broken-image | Warning | A page references a local image that does not exist. |
unknown-component | Warning | A page uses a component tag that is not in the component list. |
dxb lint --strictdxb sync to add new local files to docs.json and clear orphan-file warnings in one step.