Search Documentation

Search for pages and headings in the documentation

Auto-Generation Examples

Real-world examples showing auto-generation in action.

Example 1: Simple Feature List

Setup

{
    id: "features",
    label: "Features",
    autoGenerated: true,
}

Files

content/my-docs/features/
β”œβ”€β”€ authentication.md
β”œβ”€β”€ breadcrumbs.md
β”œβ”€β”€ dark-mode.md
β”œβ”€β”€ export-data.md
└── icons.md

Result

✨ Features
β”œβ”€β”€ Authentication
β”œβ”€β”€ Breadcrumbs
β”œβ”€β”€ Dark Mode
β”œβ”€β”€ Export Data
└── Icons

(Alphabetical order)

Example 2: Large API Reference

Setup

{
    id: "endpoints",
    label: "Endpoints",
    groups: [
        { id: "users", label: "Users", autoGenerated: true },
        { id: "posts", label: "Posts", autoGenerated: true },
        { id: "comments", label: "Comments", autoGenerated: true },
    ],
}

Files

content/api/endpoints/users/
β”œβ”€β”€ create.md
β”œβ”€β”€ delete.md
β”œβ”€β”€ get-by-id.md
β”œβ”€β”€ list.md
└── update.md

content/api/endpoints/posts/
β”œβ”€β”€ create.md
β”œβ”€β”€ delete.md
β”œβ”€β”€ list.md
└── update.md

content/api/endpoints/comments/
β”œβ”€β”€ create.md
└── list.md

Result

πŸ“‘ API Reference
β”œβ”€β”€ Comments
β”‚   β”œβ”€β”€ Create
β”‚   └── List
β”œβ”€β”€ Posts
β”‚   β”œβ”€β”€ Create
β”‚   β”œβ”€β”€ Delete
β”‚   β”œβ”€β”€ List
β”‚   └── Update
└── Users
    β”œβ”€β”€ Create
    β”œβ”€β”€ Delete
    β”œβ”€β”€ Get By Id
    β”œβ”€β”€ List
    └── Update

Example 3: Numeric Ordering

Setup

{
    id: "course",
    label: "Course",
    autoGenerated: true,
}

Files (with numeric prefixes)

content/learning/course/
β”œβ”€β”€ 01-introduction.md
β”œβ”€β”€ 02-setup.md
β”œβ”€β”€ 03-hello-world.md
β”œβ”€β”€ 04-variables.md
β”œβ”€β”€ 05-functions.md
β”œβ”€β”€ 06-advanced.md
└── 07-conclusion.md

Result

πŸŽ“ Course
β”œβ”€β”€ Introduction
β”œβ”€β”€ Setup
β”œβ”€β”€ Hello World
β”œβ”€β”€ Variables
β”œβ”€β”€ Functions
β”œβ”€β”€ Advanced
└── Conclusion

(Numbered order preserved!)

Example 4: Filtering with navHidden

Setup

{
    id: "guides",
    label: "Guides",
    autoGenerated: true,
}

Files

content/docs/guides/
β”œβ”€β”€ getting-started.md (normal)
β”œβ”€β”€ installation.md (normal)
β”œβ”€β”€ internal-notes.md (navHidden: true)
β”œβ”€β”€ performance-tips.md (normal)
└── wip-section.md (draft: true)

Result

πŸ“– Guides
β”œβ”€β”€ Getting Started
β”œβ”€β”€ Installation
β”œβ”€β”€ Performance Tips
(Internal Notes and WIP hidden)

Example 5: Growth Over Time

Month 1 (Initial Setup)

configuration:
autoGenerated: true

Files:
β”œβ”€β”€ overview.md

Sidebar:
β”œβ”€β”€ Overview

Month 3 (Growing)

(Same configuration, no changes)

Files:
β”œβ”€β”€ overview.md
β”œβ”€β”€ authentication.md
β”œβ”€β”€ caching.md
β”œβ”€β”€ database-setup.md

Sidebar:
β”œβ”€β”€ Authentication
β”œβ”€β”€ Caching
β”œβ”€β”€ Database Setup
β”œβ”€β”€ Overview

Month 6 (Large)

(Still same configuration!)

Files:
β”œβ”€β”€ overview.md
β”œβ”€β”€ authentication.md
β”œβ”€β”€ caching.md
β”œβ”€β”€ database-setup.md
β”œβ”€β”€ deployment.md
β”œβ”€β”€ error-handling.md
β”œβ”€β”€ logging.md
β”œβ”€β”€ monitoring.md
β”œβ”€β”€ performance.md
β”œβ”€β”€ security.md
└── troubleshooting.md

Sidebar:
β”œβ”€β”€ Authentication
β”œβ”€β”€ Caching
β”œβ”€β”€ Database Setup
β”œβ”€β”€ Deployment
β”œβ”€β”€ Error Handling
β”œβ”€β”€ Logging
β”œβ”€β”€ Monitoring
β”œβ”€β”€ Overview
β”œβ”€β”€ Performance
β”œβ”€β”€ Security
└── Troubleshooting

Key point: Configuration hasn’t changed at all, yet docs grew 10x!

Example 6: Mixed with Hidden Files

Setup

{
    id: "docs",
    label: "Documentation",
    autoGenerated: true,
}

Files

content/main-docs/
β”œβ”€β”€ api.md
β”œβ”€β”€ architecture.md
β”œβ”€β”€ changelog.md
β”œβ”€β”€ deprecated-old-api.md (navHidden: true)
β”œβ”€β”€ features.md
β”œβ”€β”€ performance.md
β”œβ”€β”€ readme.md
β”œβ”€β”€ support.md
└── wip-new-feature.md (draft: true)

Result

πŸ“š Documentation
β”œβ”€β”€ Api
β”œβ”€β”€ Architecture
β”œβ”€β”€ Changelog
β”œβ”€β”€ Features
β”œβ”€β”€ Performance
β”œβ”€β”€ Readme
└── Support
(Deprecated and WIP excluded)

Example 7: Nested Auto-Generation

Setup

{
    id: "docs",
    label: "Documentation",
    groups: [
        {
            id: "core",
            label: "Core",
            groups: [
                {
                    id: "concepts",
                    label: "Concepts",
                    autoGenerated: true,  // Scans docs/core/concepts/
                },
                {
                    id: "guides",
                    label: "Guides",
                    autoGenerated: true,  // Scans docs/core/guides/
                },
            ],
        },
        {
            id: "advanced",
            label: "Advanced",
            autoGenerated: true,  // Scans docs/advanced/
        },
    ],
}

Files

content/main-docs/
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ concepts/
β”‚   β”‚   β”œβ”€β”€ entries.md
β”‚   β”‚   β”œβ”€β”€ groups.md
β”‚   β”‚   └── tabs.md
β”‚   └── guides/
β”‚       β”œβ”€β”€ getting-started.md
β”‚       └── setup.md
└── advanced/
    β”œβ”€β”€ performance.md
    β”œβ”€β”€ security.md
    └── testing.md

Result

πŸ“š Documentation
β”œβ”€β”€ Advanced
β”‚   β”œβ”€β”€ Performance
β”‚   β”œβ”€β”€ Security
β”‚   └── Testing
└── Core
    β”œβ”€β”€ Concepts
    β”‚   β”œβ”€β”€ Entries
    β”‚   β”œβ”€β”€ Groups
    β”‚   └── Tabs
    └── Guides
        β”œβ”€β”€ Getting Started
        └── Setup

Best Practices

  1. Use numeric prefixes for tutorials

    01-intro.md
    02-setup.md
    03-first-app.md
  2. Use navLabel for custom sidebar text

    ---
    title: "Frequently Asked Questions"
    navLabel: "FAQ"
    ---
  3. Use navHidden for drafts

    ---
    draft: true
    navHidden: true
    ---
  4. Combine with hybrid for control

    entries: [{ slug: "overview" }],
    autoGenerated: true,  // Rest auto-discovered

Next Steps

Learn about alternatives: