Search Documentation

Search for pages and headings in the documentation

Three-Tier Hierarchy Overview

Navigation Hierarchy Concept

CelestialDocs uses a clean three-tier system to organize content. Understanding this structure is key to building effective documentation.

The Three Tiers

Tier 1: Entries (Pages)

The foundationβ€”individual Markdown or MDX files representing one page.

Entry
β”œβ”€β”€ One file = One page
β”œβ”€β”€ E.g., guides/installation.md
β”œβ”€β”€ Becomes URL: /docs/guides/installation
└── Shows in sidebar as a clickable link

Tier 2: Groups (Collections)

Collections of related entries organized into sidebar sections.

Group: "Getting Started"
β”œβ”€β”€ Collapsible sidebar section
β”œβ”€β”€ Contains multiple entries
β”œβ”€β”€ Examples: Guides, Tutorials, Concepts
└── Can contain other groups (nested)

Tier 3: Tabs (Contexts)

Top-level navigation that switches the entire sidebar context.

Tab: "API Reference"
β”œβ”€β”€ Appears at top of sidebar
β”œβ”€β”€ Can be clicked to switch navigation context
β”œβ”€β”€ Contains multiple groups
└── Perfect for separating major sections

Hierarchy Visualization

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Web Browser                              β”‚
β”‚                                                              β”‚
β”‚  [Learn] [Getting Started] [API Reference] [Guides]         β”‚
β”‚  ↑ Tabs                                                       β”‚
β”‚                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Sidebar (current tab: "Getting Started")             β”‚  β”‚
β”‚  β”‚                                                      β”‚  β”‚
β”‚  β”‚  πŸ“š Getting Started (Group)                         β”‚  β”‚
β”‚  β”‚    β”œβ”€β”€ Installation (Entry) <- clickable link       β”‚  β”‚
β”‚  β”‚    β”œβ”€β”€ Quick Start (Entry) <- clickable link        β”‚  β”‚
β”‚  β”‚    └── Configuration (Entry) <- clickable link      β”‚  β”‚
β”‚  β”‚                                                      β”‚  β”‚
β”‚  β”‚  πŸ”— Related Sections (Group)                        β”‚  β”‚
β”‚  β”‚    β”œβ”€β”€ FAQ (Entry)                                  β”‚  β”‚
β”‚  β”‚    └── Troubleshooting (Entry)                      β”‚  β”‚
β”‚  β”‚                                                      β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                              β”‚
β”‚  (When user clicks "API Reference" tab, entire sidebar     β”‚
β”‚   switches to show that tab's groups and entries)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How They Connect

File System -> Configuration -> UI

Step 1: File System
    content/my-docs/
    β”œβ”€β”€ getting-started/
    β”‚   β”œβ”€β”€ introduction.md        (File)
    β”‚   β”œβ”€β”€ installation.md        (File)
    β”‚   └── quick-start.md         (File)
    └── api/
        β”œβ”€β”€ endpoints.md           (File)
        └── authentication.md      (File)

            ↓ (Configuration connects files to groups)

Step 2: Configuration (data/config.ts)
    groups: [
        {
            id: "getting-started",
            label: "Getting Started",
            autoGenerated: true,  <- Discovers files from folder
        },
        {
            id: "api",
            label: "API Reference",
            tab: true,            <- Makes this a tab
            autoGenerated: true,
        },
    ]

            ↓ (System renders configuration as UI)

Step 3: User Interface
    [Learn] [Getting Started] [API Reference]  <- Tabs
         ↓
    πŸ“š Getting Started                    <- Group
    β”œβ”€β”€ Introduction                      <- Entry
    β”œβ”€β”€ Installation                      <- Entry
    └── Quick Start                       <- Entry

Full Example: Placing an Entry

Let’s trace how a single file becomes a clickable link:

1. Create the File

# content/my-docs/guides/performance.md

---

title: "Performance Optimization"
description: "Tips for optimizing your system"

---

# Performance Optimization

Content about performance...

2. Register the Collection

// data/config.ts
export const CONTENT = {
    systems: [
        {
            id: "my-docs",
            dir: "content/my-docs",
            route: "/my-docs",
        },
    ],
};

3. Configure the Group

// data/config.ts
export const SIDEBAR_NAVIGATION = {
    "my-docs": {
        defaultTab: { label: "Docs", icon: "πŸ“–" },
        groups: [
            {
                id: "guides",
                label: "User Guides",
                autoGenerated: true, // Scans content/my-docs/guides/
            },
        ],
    },
};

4. Result

  • File: content/my-docs/guides/performance.md
  • Slug: guides/performance
  • URL: https://yourdocs.com/my-docs/guides/performance
  • Sidebar: Shows β€œPerformance Optimization” under β€œUser Guides” group
  • Navigation: Clickable link that users can click to read the page

Scaling the Hierarchy

The three-tier system scales beautifully:

Small Documentation (10-50 pages)

└── Default Tab
    └── Single Group (auto-generated)
        β”œβ”€β”€ Entry 1
        β”œβ”€β”€ Entry 2
        └── Entry 3

Medium Documentation (50-200 pages)

└── Default Tab
    β”œβ”€β”€ Group 1 (Getting Started)
    β”œβ”€β”€ Group 2 (Features)
    └── Group 3 (Advanced)

Large Documentation (200-1000 pages)

β”œβ”€β”€ Tab 1: User Guide
β”‚   β”œβ”€β”€ Group 1: Getting Started
β”‚   β”œβ”€β”€ Group 2: Features
β”‚   β”‚   β”œβ”€β”€ Subgroup A
β”‚   β”‚   └── Subgroup B
β”‚   └── Group 3: Advanced
β”œβ”€β”€ Tab 2: API Reference
β”‚   β”œβ”€β”€ Group 1: Endpoints
β”‚   β”œβ”€β”€ Group 2: Authentication
β”‚   └── Group 3: Webhooks
└── Tab 3: Patterns & Examples
    └── Group 1: Common Patterns (auto-generated)

Enterprise Documentation (1000+ pages)

β”œβ”€β”€ Tab 1: Getting Started
β”œβ”€β”€ Tab 2: User Documentation
β”‚   β”œβ”€β”€ Group: Basics
β”‚   β”œβ”€β”€ Group: Intermediate
β”‚   β”‚   β”œβ”€β”€ Subgroup: Configuration
β”‚   β”‚   └── Subgroup: Deployment
β”‚   └── Group: Advanced
β”‚       β”œβ”€β”€ Subgroup: Performance
β”‚       β”œβ”€β”€ Subgroup: Security
β”‚       └── Subgroup: Architecture
β”œβ”€β”€ Tab 3: API Reference
β”‚   β”œβ”€β”€ Group: v1 (Legacy)
β”‚   └── Group: v2 (Current)
β”‚       β”œβ”€β”€ Subgroup: Authentication
β”‚       β”œβ”€β”€ Subgroup: Endpoints
β”‚       └── Subgroup: Webhooks
└── Tab 4: Help & Support

Key Principles

  1. Entries are leaves - They’re always at the bottom; you can’t put groups inside entries
  2. Groups are organizational - They exist to group entries logically
  3. Tabs are contextual - They switch entire navigation experiences
  4. Nesting has limits - 3-4 levels is usually optimal; more gets confusing
  5. Structure mirrors files - Your folder structure should match your navigation

Next Steps

Now understand the visual representation:

Or learn to configure: