---
title: "Auto-Generation Examples"
description: "Practical examples of auto-generation in different scenarios"
---

Real-world examples showing auto-generation in action.

## Example 1: Simple Feature List

### Setup

```typescript
{
    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

```typescript
{
    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

```typescript
{
    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

```typescript
{
    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

```typescript
{
    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

```typescript
{
    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**

    ```yaml
    ---
    title: "Frequently Asked Questions"
    navLabel: "FAQ"
    ---
    ```

3. **Use navHidden for drafts**

    ```yaml
    ---
    draft: true
    navHidden: true
    ---
    ```

4. **Combine with hybrid for control**
    ```typescript
    entries: [{ slug: "overview" }],
    autoGenerated: true,  // Rest auto-discovered
    ```

## Next Steps

Learn about alternatives:

- [Manual Creation](/docs/generation-strategies/manual-creation/explicit-control)
- [Hybrid Approach](/docs/generation-strategies/hybrid-approach/best-of-both)
