zudo-doc

Type to search...

to open search from anywhere

CategoryTreeNav

CreatedMar 22, 2026Takeshi Takatsudo

An Astro component that renders a nested tree of child page links for category index pages.

Overview

CategoryTreeNav is an Astro component that displays child pages of a category as a nested tree of links (ul > li > ul > li pattern). It is an alternative to CategoryNav which uses a card-grid style — CategoryTreeNav is more compact and suited to categories with deeper nesting.

ℹ️ Info

CategoryTreeNav is globally available in all MDX doc pages — no import needed. It is registered alongside the admonition components (Note, Tip, etc.) in the doc page route.

Live Example

Here is CategoryTreeNav rendering the Guides category:

Usage

Use CategoryTreeNav in a category’s index.mdx to create a compact tree-style listing:

---
title: Getting Started
sidebar_position: 0
---

Welcome to the Getting Started section.

<CategoryTreeNav category="getting-started" />

Since CategoryTreeNav is an Astro component (zero client-side JavaScript), no client: directive is needed.

Comparison with CategoryNav

FeatureCategoryNavCategoryTreeNav
Layout2-column card gridNested tree list
DescriptionShown in each cardShown inline after title
NestingFlat (children only)Up to 3 levels deep
Best forLanding pages, overviewsDeep hierarchies, compact listings

Props

PropTypeDefaultDescription
categorystring(required)The category slug (e.g., "guides", "reference")
langLocaleauto-detectedOverride the locale for the content collection

The lang prop is automatically detected from the current URL path, so you typically don’t need to set it.

Source

The component is defined at src/components/category-tree-nav.astro.

Revision History

AI Assistant

Ask a question about the documentation.