Sidebar
Labels
Section titled “Labels”Labels are controlled by frontmatter properties on a given page, which vary depending on if you are configuring a group or a link.
In order of precedence:
sidebar.label
title
On an index page
Section titled “On an index page”Index page labels default to Overview
if sidebar.label
is not defined.
title
is not taken into consideration due to title
being used in group labelling.
Groups
Section titled “Groups”In order of precedence:
sidebar.group.label
title
Example
Section titled “Example”For example, given the following pages:
---title: Barsidebar: label: IndexTitle group: label: GroupTitle---
---title: Bazsidebar: label: PageTitle---
The sidebar structure will look like:
DirectoryGroupTitle
- IndexTitle
- PageTitle
If we remove the sidebar
property from both, it will now look like this:
DirectoryBar
- Overview
- Baz
Ordering
Section titled “Ordering”Both links and groups use the sidebar.order
frontmatter property to configure their ordering, where groups are ordered based on the index page's order.
If sidebar.order
is not specified, it will fallback to alphabetical ordering.
For example, given the following pages:
---title: Alphasidebar: order: 3---
---title: Betasidebar: order: 2---
The sidebar structure will look like:
DirectoryBeta
- ...
DirectoryAlpha
- ...
If we remove the sidebar
property from both, it will now look like this:
DirectoryAlpha
- ...
DirectoryBeta
- ...
Hiding pages
Section titled “Hiding pages”There are three properties that can be used for hiding pages from the sidebar.
Hiding individual pages
Section titled “Hiding individual pages”hidden
Section titled “hidden”This property should only be used when the page is not an index page for a group.
---title: Placeholdersidebar: hidden: true---
group.hideIndex
Section titled “group.hideIndex”Since index pages are relied on to configure the label and sort order of groups, we have a special property that still makes the page available to our sidebar component and allows us to remove it after labelling and ordering groups.
---title: Placeholdersidebar: group: hideIndex: true---
import { DirectoryListing } from "~/components";
<DirectoryListing />
Hiding child pages of a group
Section titled “Hiding child pages of a group”To make a group render as if it was a single page, which links to the index page, use the top-level hideChildren
property.
Badges
Section titled “Badges”To specify a badge next to the link, use the sidebar.badge
property.
---title: Examplesidebar: badge: New!---
DirectoryExamples
- Example [New!]
Groups
Section titled “Groups”To specify a badge next to the group label, use the sidebar.group.badge
inside the group's index.mdx
frontmatter.
---title: Examplessidebar: group: badge: New!---
DirectoryExamples [New!]
- Example
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark