Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 69 additions & 1 deletion organize/navigation.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Navigation"
description: "Configure your documentation site navigation with groups, pages, dropdowns, tabs, and anchors in docs.json to build a sidebar structure."

Check warning on line 3 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L3

Use 'JSON' instead of 'json'.
keywords: ["navigation structure", "sidebar configuration", "page organization", "navigation groups"]
---

Expand Down Expand Up @@ -58,7 +58,7 @@
alt="Decorative graphic of groups."
/>

In the `navigation` object, `groups` is an array where each entry is an object that requires a `group` field and a `pages` field. The `icon`, `tag`, `root`, and `expanded` fields are optional.
In the `navigation` object, `groups` is an array where each entry is an object that requires a `group` field and a `pages` field. The `icon`, `tag`, `root`, `expanded`, and `directory` fields are optional.

```json
{
Expand Down Expand Up @@ -116,15 +116,83 @@
}
```

### Directory listings

Use the `directory` property to automatically display a directory of child pages below the content of a group's root page. This is useful for hub pages or landing pages that serve as entry points to a section.

Set `directory` on any navigation node—including the top-level `navigation` object, groups, tabs, anchors, dropdowns, products, versions, or languages. The value inherits recursively through descendant nodes, so you can set it once at a high level and override it deeper in the tree.

| Value | Behavior |
|---|---|
| `"none"` | Default. No directory UI is rendered. |

Check warning on line 127 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L127

In general, use active voice instead of passive voice ('is rendered').
| `"accordion"` | Displays child pages in a grouped, collapsible list below the root page content. |
| `"card"` | Displays child pages as horizontal cards below the root page content. |

<Note>
The `directory` property only affects groups that have a `root` page. Groups without a root page are not affected.
</Note>

```json
{
"navigation": {
"groups": [
{
"group": "Help Center",
"root": "help/index",
"directory": "accordion",
"pages": [
{
"group": "Getting Started",
"root": "help/getting-started/index",
"pages": [
"help/getting-started/quickstart",
"help/getting-started/install"
]
},
{
"group": "API Reference",
"root": "help/api/index",
"directory": "none",
"pages": ["help/api/overview", "help/api/endpoints"]
}
]
}
]
}
}
```

In this example:
- **Help Center** uses `"accordion"` (set explicitly).
- **Getting Started** inherits `"accordion"` from its parent.
- **API Reference** overrides with `"none"`, so its root page does not show a directory.

You can also set `directory` at the top level of the `navigation` object to apply a default across your entire site:

```json
{
"navigation": {
"directory": "card",
"groups": [
{
"group": "Guides",
"root": "guides/index",
"pages": ["guides/quickstart", "guides/deployment"]
}
]
}
}
```

### Default expanded state

Use the `expanded` property to control the default state of a nested group in the navigation sidebar.

- `expanded: true`: Group is expanded by default.

Check warning on line 191 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L191

In general, use active voice instead of passive voice ('is expanded').
- `expanded: false` or omitted: Group is collapsed by default.

Check warning on line 192 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L192

In general, use active voice instead of passive voice ('is collapsed').

<Note>
The `expanded` property only affects nested groups--groups within groups. Top-level groups are always expanded and cannot be collapsed.

Check warning on line 195 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L195

In general, use active voice instead of passive voice ('be collapsed').
</Note>

```json
Expand Down Expand Up @@ -380,9 +448,9 @@
}
```

## Dropdowns

Check warning on line 451 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L451

Use 'dropdowns?' instead of 'Dropdowns'.

Dropdowns are an expandable menu at the top of your sidebar navigation. Each item in a dropdown directs to a section of your documentation.

Check warning on line 453 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L453

Use 'dropdowns?' instead of 'Dropdowns'.

<img
className="block dark:hidden pointer-events-none"
Expand Down Expand Up @@ -951,9 +1019,9 @@

</CodeGroup>

## Breadcrumbs

Check warning on line 1022 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L1022

Use 'breadcrumbs?' instead of 'Breadcrumbs'.

Breadcrumbs display the full navigation path at the top of pages. Some themes have breadcrumbs enabled by default and others do not. You can control whether breadcrumbs display on your site using the `styling` property in your `docs.json`.

Check warning on line 1024 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L1024

Use 'breadcrumbs?' instead of 'Breadcrumbs'.

<CodeGroup>

Expand Down
8 changes: 8 additions & 0 deletions organize/settings-reference.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "docs.json schema reference"

Check warning on line 2 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L2

Use 'JSON' instead of 'json'.
description: "Complete reference for every docs.json configuration property with types, default values, descriptions, and usage examples for your docs site."

Check warning on line 3 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L3

Use 'JSON' instead of 'json'.
keywords: ["docs.json", "schema", "reference", "configuration", "all settings", "properties", "complete"]
---

Expand Down Expand Up @@ -41,6 +41,7 @@
| `footer.links` | array | No | None |
| `banner.content` | string | No | None |
| `banner.dismissible` | boolean | No | `false` |
| `navigation.directory` | `"none"` \| `"accordion"` \| `"card"` | No | `"none"` |
| `interaction.drilldown` | boolean | No | Theme default |
| `contextual.options` | array | No | None |
| `contextual.display` | `"header"` \| `"toc"` | No | `"header"` |
Expand Down Expand Up @@ -157,7 +158,7 @@

##### `navigation.global.dropdowns`

Dropdown menus.

Check warning on line 161 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L161

Use 'dropdowns?' instead of 'Dropdown'.

**Type:** array of object—each with: `dropdown` (string, required), `icon` (string), `iconType` (string), `hidden` (boolean), `href` (string uri, required)

Expand Down Expand Up @@ -209,7 +210,7 @@

#### `navigation.dropdowns`

Dropdown menus.

Check warning on line 213 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L213

Use 'dropdowns?' instead of 'Dropdown'.

**Type:** array of object—see `navigation.global.dropdowns` for shape.

Expand All @@ -219,6 +220,13 @@

**Type:** array of object—see `navigation.global.products` for shape.

#### `navigation.directory`

Default directory listing style for group root pages. Inherits recursively through descendant navigation nodes. Descendants can override with their own `directory` value. See [Directory listings](/organize/navigation#directory-listings).

**Type:** `"none"` | `"accordion"` | `"card"`
**Default:** `"none"`

#### `navigation.groups`

Groups for organizing content into labeled sections.
Expand Down Expand Up @@ -449,14 +457,14 @@

Code block theme configuration.

**Type:** `"system"` | `"dark"` | string (Shiki theme name) | object

Check warning on line 460 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L460

Did you really mean 'Shiki'?
**Default:** `"system"`

When an object:

##### `styling.codeblocks.theme`

A single Shiki theme name for both modes, or an object with `light` and `dark` Shiki theme names.

Check warning on line 467 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L467

Did you really mean 'Shiki'?

**Type:** string or object

Expand All @@ -468,7 +476,7 @@

###### `styling.codeblocks.languages.custom`

Paths to JSON files describing custom Shiki languages in [TextMate grammar format](https://macromates.com/manual/en/language_grammars).

Check warning on line 479 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L479

Did you really mean 'Shiki'?

**Type:** array of string

Expand Down
4 changes: 4 additions & 0 deletions organize/settings-structure.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Site structure"
description: "Configure navbar, navigation groups, footer links, banner, contextual menu, redirects, and other structural elements in your docs.json file."

Check warning on line 3 in organize/settings-structure.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-structure.mdx#L3

Use 'JSON' instead of 'json'.
keywords: ["navbar", "navigation", "footer", "banner", "contextual", "redirects", "variables", "metadata", "docs.json"]
---

Expand Down Expand Up @@ -193,6 +193,10 @@
Product switcher for sites with multiple [products](/organize/navigation#products).
</ResponseField>

<ResponseField name="navigation.directory" type='"none" | "accordion" | "card"'>
Default [directory listing](/organize/navigation#directory-listings) style for group root pages. When set, all descendant navigation nodes inherit this value unless they specify their own `directory`. Defaults to `"none"`.
</ResponseField>

<ResponseField name="navigation.groups" type="array of object">
[Groups](/organize/navigation#groups) for organizing content into sections.
</ResponseField>
Expand Down
Loading