Skip to content
Open
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
67 changes: 35 additions & 32 deletions 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 @@ -118,68 +118,71 @@

### Directory listings

When a group has a root page, you can generate a directory listing on that page. The directory listing displays the group's child pages and nested groups to give users an overview of the section's content.
Use the `directory` property to automatically render a directory of child pages on group root pages. When you set `directory` on a navigation element, any group with a `root` page beneath that element displays a listing of its pages below the page content.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use the `directory` property to automatically render a directory of child pages on group root pages. When you set `directory` on a navigation element, any group with a `root` page beneath that element displays a listing of its pages below the page content.
Use the `directory` property to automatically render a directory of child pages and groups on group root pages. When you set `directory` on any object within the `navigation` tree in `docs.json`, groups with a `root` page matching or beneath that object display a listing of their pages and groups below their page contents.


Set the `directory` property on a group, tab, or the top-level `navigation` object to enable directory listings. The property accepts three values:
The `directory` property accepts three values:

| Value | Description |
|---------------|----------------------------------------------------|
| `"accordion"` | Displays child pages in a list |
| `"card"` | Displays child pages as horizontal cards |
| `"none"` | Disables directory listings (default) |
| Value | Behavior |
| :---------- | :------- |
| `"none"` | No directory listing. Default value. |
| `"accordion"` | Displays child pages in a collapsible list grouped by section. |
| `"card"` | Displays child pages in a horizontal card layout. |

The `directory` value inherits through the navigation hierarchy. If you set a `directory` value on a parent element, the value applies to all descendant groups unless overridden.
The `directory` value inherits recursively through the navigation tree. Set it on a parent navigation element and all descendant groups inherit the same value. Any descendant can override the inherited value by setting `"directory": "none"`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `directory` value inherits recursively through the navigation tree. Set it on a parent navigation element and all descendant groups inherit the same value. Any descendant can override the inherited value by setting `"directory": "none"`.
The `directory` value inherits recursively through the navigation tree. Set it on anywhere within the navigation object and all descendant groups inherit the same value. Any descendant can override the inherited value by setting `directory` to a different value.


```json Enable accordion directory for a group {6}
You can set `directory` anywhere in the navigation object in your `docs.json` file, including on tabs, anchors, dropdowns, products, versions, languages, and individual groups.

```json
{
"navigation": {
"groups": [
{
"group": "API reference",
"root": "api-overview",
"group": "Help Center",
"root": "help/index",
"directory": "accordion",
"pages": [
"api-reference/authentication",
"api-reference/endpoints",
"api-reference/errors"
{
"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"
]
}
]
}
]
}
}
```

```json Enable card directory for all groups {3}
{
"navigation": {
"directory": "card",
"groups": [
{
"group": "Guides",
"root": "guides/overview",
"pages": [
"guides/quickstart",
"guides/configuration"
]
}
]
}
}
```
In this example:
- **Help Center** uses `"accordion"` and its root page displays a directory listing.
- **Getting Started** inherits `"accordion"` from its parent and also displays a directory listing.
- **API Reference** overrides with `"none"`, so its root page does not display a directory listing.

<Note>
Directory listings only appear on group root pages. If a group does not have a `root` property, it cannot display a directory listing.
The `directory` property only affects groups that have a `root` page. Groups without a `root` page are not affected.
</Note>

### 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 181 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L181

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

Check warning on line 182 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L182

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 185 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L185

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

```json
Expand Down Expand Up @@ -435,9 +438,9 @@
}
```

## Dropdowns

Check warning on line 441 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L441

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 443 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L443

Use 'dropdowns?' instead of 'Dropdowns'.

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

</CodeGroup>

## Breadcrumbs

Check warning on line 1012 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L1012

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 1014 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L1014

Use 'breadcrumbs?' instead of 'Breadcrumbs'.

<CodeGroup>

Expand Down
5 changes: 2 additions & 3 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 @@ -157,7 +157,7 @@

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

Dropdown menus.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L160

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 +209,7 @@

#### `navigation.dropdowns`

Dropdown menus.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L212

Use 'dropdowns?' instead of 'Dropdown'.

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

Expand All @@ -233,10 +233,9 @@

#### `navigation.directory`

Directory layout for group root pages. When set to `"accordion"` or `"card"`, groups with a `root` page display a directory listing of their child pages. Set to `"none"` to disable. Inherits recursively through the navigation hierarchy; descendants can override.
Directory layout for root pages in navigation groups. Inherits recursively; descendants can override. See [Directory listings](/organize/navigation#directory-listings).

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L236

Use semicolons judiciously.

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

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L238

Don't put a space before or after a dash.

---

Expand Down Expand Up @@ -456,14 +455,14 @@

Code block theme configuration.

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

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L458

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 465 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L465

Did you really mean 'Shiki'?

**Type:** string or object

Expand All @@ -475,7 +474,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 477 in organize/settings-reference.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-reference.mdx#L477

Did you really mean 'Shiki'?

**Type:** array of string

Expand Down
4 changes: 2 additions & 2 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 @@ -201,8 +201,8 @@
Individual [pages](/organize/navigation#pages) that make up your documentation.
</ResponseField>

<ResponseField name="navigation.directory" type="string" default="none">
Directory layout for group root pages. Set to `"accordion"` or `"card"` to display a listing of child pages on group root pages. Set to `"none"` to disable. Inherits recursively; descendants can override. See [Directory listings](/organize/navigation#directory-listings) for more information.
<ResponseField name="navigation.directory" type='"none" | "accordion" | "card"'>
Directory layout for root pages in navigation groups. When set, groups with a `root` page automatically display a listing of their children below the page content. Values inherit recursively through the navigation tree; descendants can override. See [Directory listings](/organize/navigation#directory-listings).

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/settings-structure.mdx#L205

Use semicolons judiciously.
</ResponseField>

---
Expand Down
Loading