-
Notifications
You must be signed in to change notification settings - Fork 213
Add comprehensive tags documentation to navigation #2913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -98,11 +98,11 @@ | |||||
|
|
||||||
| Use the `expanded` property to control the default state of a nested group in the navigation sidebar. | ||||||
|
|
||||||
| - `expanded: true`: Group is expanded by default. | ||||||
| - `expanded: false` or omitted: Group is collapsed by default. | ||||||
|
|
||||||
| <Note> | ||||||
| The `expanded` property only affects nested groups--groups within groups. Top-level groups are always expanded and cannot be collapsed. | ||||||
| </Note> | ||||||
|
|
||||||
| ```json | ||||||
|
|
@@ -119,6 +119,212 @@ | |||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ### Tags and labels | ||||||
|
|
||||||
| Use tags to highlight important navigation items and draw attention to new, updated, or deprecated content. Tags appear as small labels next to navigation group names in the sidebar. | ||||||
|
|
||||||
| <img | ||||||
| className="block dark:hidden pointer-events-none" | ||||||
| src="/images/navigation/tags-light.png" | ||||||
| alt="Navigation groups with tags displayed in the sidebar." | ||||||
| /> | ||||||
|
|
||||||
| <img | ||||||
| className="hidden dark:block pointer-events-none" | ||||||
| src="/images/navigation/tags-dark.png" | ||||||
| alt="Navigation groups with tags displayed in the sidebar." | ||||||
| /> | ||||||
|
|
||||||
| #### Adding tags to groups | ||||||
|
|
||||||
| Add a `tag` field to any group object in your navigation configuration. The tag value is a string that appears next to the group name. | ||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "navigation": { | ||||||
| "groups": [ | ||||||
| { | ||||||
| "group": "API v2", | ||||||
| "tag": "NEW", | ||||||
| "icon": "rocket", | ||||||
| "pages": ["api-v2/overview", "api-v2/authentication"] | ||||||
| }, | ||||||
| { | ||||||
| "group": "Experimental features", | ||||||
| "tag": "BETA", | ||||||
| "icon": "flask", | ||||||
| "pages": ["experimental/feature-a", "experimental/feature-b"] | ||||||
| }, | ||||||
| { | ||||||
| "group": "Legacy API", | ||||||
| "tag": "DEPRECATED", | ||||||
| "icon": "triangle-exclamation", | ||||||
| "pages": ["legacy/overview", "legacy/endpoints"] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| #### Tag best practices | ||||||
|
|
||||||
| Use tags strategically to guide users to the most relevant content: | ||||||
|
|
||||||
| - **NEW**: Highlight recently added features, sections, or documentation pages | ||||||
| - **BETA**: Indicate features that are in beta or preview status | ||||||
| - **DEPRECATED**: Mark content that will be removed or replaced in future versions | ||||||
|
Check warning on line 175 in organize/navigation.mdx
|
||||||
| - **UPDATED**: Draw attention to recently refreshed documentation | ||||||
| - **PREVIEW**: Identify early-access features or experimental functionality | ||||||
|
Check warning on line 177 in organize/navigation.mdx
|
||||||
|
|
||||||
| Keep tag text short and clear. Tags with more than 12 characters may be truncated in the sidebar. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure the 12-character truncation limit is stable across themes; keeping this generic might age better.
Suggested change
|
||||||
|
|
||||||
| #### Tags with nested groups | ||||||
|
|
||||||
| Tags work with nested groups, allowing you to label both parent and child sections: | ||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "navigation": { | ||||||
| "groups": [ | ||||||
| { | ||||||
| "group": "Platform API", | ||||||
| "tag": "v2.0", | ||||||
| "icon": "code", | ||||||
| "pages": [ | ||||||
| "platform/overview", | ||||||
| { | ||||||
| "group": "Webhooks", | ||||||
| "tag": "NEW", | ||||||
| "icon": "webhook", | ||||||
| "pages": ["platform/webhooks/setup", "platform/webhooks/events"] | ||||||
| }, | ||||||
| { | ||||||
| "group": "GraphQL", | ||||||
| "tag": "BETA", | ||||||
| "icon": "diagram-project", | ||||||
| "pages": ["platform/graphql/queries", "platform/graphql/mutations"] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| #### Tags in different navigation contexts | ||||||
|
|
||||||
| Tags can be applied to groups within tabs, anchors, dropdowns, and other navigation elements: | ||||||
|
|
||||||
| <CodeGroup> | ||||||
|
|
||||||
| ```json Tags in tabs | ||||||
| { | ||||||
| "navigation": { | ||||||
| "tabs": [ | ||||||
| { | ||||||
| "tab": "Documentation", | ||||||
| "icon": "book-open", | ||||||
| "groups": [ | ||||||
| { | ||||||
| "group": "Getting started", | ||||||
| "pages": ["quickstart", "installation"] | ||||||
| }, | ||||||
| { | ||||||
| "group": "Advanced features", | ||||||
| "tag": "NEW", | ||||||
| "icon": "sparkles", | ||||||
| "pages": ["advanced/caching", "advanced/webhooks"] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ```json Tags in anchors | ||||||
| { | ||||||
| "navigation": { | ||||||
| "anchors": [ | ||||||
| { | ||||||
| "anchor": "Documentation", | ||||||
| "icon": "book-open", | ||||||
| "groups": [ | ||||||
| { | ||||||
| "group": "Core concepts", | ||||||
| "pages": ["concepts/overview", "concepts/architecture"] | ||||||
| }, | ||||||
| { | ||||||
| "group": "AI features", | ||||||
| "tag": "BETA", | ||||||
| "icon": "brain", | ||||||
| "pages": ["ai/assistant", "ai/recommendations"] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ```json Tags in dropdowns | ||||||
| { | ||||||
| "navigation": { | ||||||
| "dropdowns": [ | ||||||
| { | ||||||
| "dropdown": "API Reference", | ||||||
| "icon": "code", | ||||||
| "groups": [ | ||||||
| { | ||||||
| "group": "REST API", | ||||||
| "pages": ["api/rest/overview"] | ||||||
| }, | ||||||
| { | ||||||
| "group": "WebSocket API", | ||||||
| "tag": "PREVIEW", | ||||||
| "icon": "plug", | ||||||
| "pages": ["api/websocket/connection", "api/websocket/events"] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ```json Tags in products | ||||||
| { | ||||||
| "navigation": { | ||||||
| "products": [ | ||||||
| { | ||||||
| "product": "Platform", | ||||||
| "icon": "server", | ||||||
| "groups": [ | ||||||
| { | ||||||
| "group": "Core features", | ||||||
| "pages": ["platform/overview"] | ||||||
| }, | ||||||
| { | ||||||
| "group": "Edge functions", | ||||||
| "tag": "NEW", | ||||||
| "icon": "bolt", | ||||||
| "pages": ["platform/edge/overview", "platform/edge/deployment"] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| ] | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| </CodeGroup> | ||||||
|
|
||||||
| #### Styling considerations | ||||||
|
|
||||||
| Tags inherit your documentation's primary color scheme by default. The visual appearance of tags varies by theme, but all themes display tags consistently next to group names in the sidebar. | ||||||
|
|
||||||
| Tags are automatically styled to ensure readability in both light and dark modes. No additional styling configuration is required. | ||||||
|
|
||||||
| ## Tabs | ||||||
|
|
||||||
| Tabs create distinct sections of your documentation with separate URL paths. Tabs create a horizontal navigation bar at the top of your documentation that lets users switch between sections. | ||||||
|
|
@@ -293,7 +499,7 @@ | |||||
|
|
||||||
| ## Dropdowns | ||||||
|
|
||||||
| Dropdowns are contained in an expandable menu at the top of your sidebar navigation. Each item in a dropdown directs to a section of your documentation. | ||||||
|
|
||||||
| <img | ||||||
| className="block dark:hidden pointer-events-none" | ||||||
|
|
@@ -408,7 +614,7 @@ | |||||
|
|
||||||
| Integrate OpenAPI specifications directly into your navigation structure to automatically generate API documentation. Create dedicated API sections or place endpoint pages within other navigation components. | ||||||
|
|
||||||
| Set a default OpenAPI specification at any level of your navigation hierarchy. Child elements will inherit this specification unless they define their own specification. | ||||||
|
|
||||||
| <Note> | ||||||
| When you add the `openapi` property to a navigation element (such as an anchor, tab, or group) without specifying any pages, Mintlify automatically generates pages for **all endpoints** defined in your OpenAPI specification. | ||||||
|
|
@@ -578,7 +784,7 @@ | |||||
|
|
||||||
| ## Nesting | ||||||
|
|
||||||
| Navigation elements can be nested within each other to create complex hierarchies. You must have one root-level parent navigation element such as tabs, groups, or a dropdown. You can nest other types of navigation elements within your primary navigation pattern. | ||||||
|
|
||||||
| Each navigation element can contain one type of child element at each level of your navigation hierarchy. For example, a tab can contain anchors that contain groups, but a tab cannot contain both anchors and groups at the same level. | ||||||
|
|
||||||
|
|
@@ -802,7 +1008,7 @@ | |||||
|
|
||||||
| ## 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 are enabled for your site using the `styling` property in your `docs.json`. | ||||||
|
|
||||||
| <CodeGroup> | ||||||
|
|
||||||
|
|
@@ -826,10 +1032,10 @@ | |||||
|
|
||||||
| ### Enable auto-navigation for groups | ||||||
|
|
||||||
| When a user expands a navigation group, some themes will automatically navigate to the first page in the group. You can override a theme's default behavior using the `drilldown` option. | ||||||
|
|
||||||
| - Set to `true` to force automatic navigation to the first page when a navigation group is selected. | ||||||
| - Set to `false` to prevent navigation and only expand or collapse the group when it is selected. | ||||||
| - Leave unset to use the theme's default behavior. | ||||||
|
|
||||||
| <CodeGroup> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these screenshots aren’t included in this PR—can you add
/images/navigation/tags-light.pngand/images/navigation/tags-dark.png(or update the paths) so the page doesn’t render broken images?