Beyond pages, your sidebar navigation can include labels (section headings), links (to external URLs), and dividers (visual separators). The dxb nav commands let you add and inspect these without hand-editing docs.json, keeping the manifest valid.
Navigation node types
A space's nav array can contain these node types:
| Type | Renders as | Use for |
|---|---|---|
| `page` | A clickable page link | Your content |
| `group` | A collapsible labeled section | Grouping related pages |
| `label` | A non-clickable section heading | Visually separating groups |
| `link` | An external link | Status page, GitHub, your app |
| `divider` | A horizontal rule | Visual separation |
Pages and groups are created with dxb new page (groups form from nested folders). Labels, links, and dividers are added with dxb nav.
Common options
Most dxb nav subcommands accept:
| Flag | Description |
|---|---|
| `--space <slug>` | Which space to act on (default: the first space). |
| `--group <label>` | Place the item inside this group. |
Add a label
A label is a small heading that separates sections of the sidebar:
dxb nav add-label "Reference" --space docsAdd an external link
Link out to a URL — your status page, repo, or main site:
dxb nav add-link "Status" "https://status.example.com" --space docsadd-link takes the link text and the destination URL as its two arguments.
Add a divider
Insert a horizontal separator:
dxb nav add-divider --space docsRemove a nav entry
Take a page or item out of the navigation (alias rm):
dxb nav remove guides/old-topicInspect the tree
View the full structure, including labels, links, and dividers:
dxb nav tree --space docsDocumentation (docs)
├─ Get started
│ ├─ Introduction
│ └─ Quickstart
├─ label: Reference
├─ Guides
└─ link: Status → https://status.example.comEditing docs.json directly
You can edit docs.json by hand, but prefer the dxb nav commands — they validate the result and prevent common mistakes (referencing a missing file, duplicate slugs, malformed nodes). If you do edit by hand, run dxb lint afterward to catch problems:
{
"type": "group",
"label": "Get started",
"items": [
{ "type": "page", "file": "get-started/introduction" },
{ "type": "page", "file": "get-started/quickstart" }
]
}