---
title: "Create Your First Collection"
description: "Set up your first documentation collection with proper configuration"
---

A collection is an independent documentation system with its own content folder, routes, and navigation structure. Let's create your first one.

## Step 1: Create the Content Directory

Create a new folder in `content/` for your collection:

```bash
mkdir -p content/my-docs/guides
```

## Step 2: Add a First Page

Create your first markdown file:

```bash
# content/my-docs/guides/hello.md
```

Add this content:

```markdown
---
title: "Hello World"
description: "Your first page in PID^TOO||"
---

# Hello World

This is your first page! Edit `content/my-docs/guides/hello.md` to change this content.
```

## Step 3: Register the Collection

Open `data/config.ts` and add your collection to `CONTENT.systems`:

```typescript
export const CONTENT: ContentConfig = {
    systems: [
        {
            id: "docs",
            dir: "content/docs",
            defaultDocRedirect: "/docs/getting-started/introduction",
            route: "/docs",
        },
        // Add your new collection:
        {
            id: "my-docs",
            dir: "content/my-docs",
            defaultDocRedirect: "/my-docs/guides/hello", // Where to redirect
            route: "/my-docs", // Base URL route
        },
    ],
};
```

**What each property means:**

- `id`: Unique identifier for your collection
- `dir`: Folder path containing the markdown files
- `defaultDocRedirect`: Where to send users when they visit `/my-docs/`
- `route`: URL base for all pages in this collection

## Step 4: Add Navigation Configuration

Still in `data/config.ts`, add navigation configuration to `SIDEBAR_NAVIGATION`:

```typescript
export const SIDEBAR_NAVIGATION: SidebarNavigation = {
    // ... existing configurations ...
    "my-docs": {
        defaultTab: {
            label: "Guides",
            icon: "�",
        },
        groups: [
            {
                id: "guides",
                label: "Getting Started",
                icon: "",
                autoGenerated: true, // Auto-discover files in content/my-docs/
            },
        ],
    },
};
```

## Step 5: Visit Your Collection

Navigate to `http://localhost:4321/my-docs/guides/hello`

You should see your first page with:

-  Sidebar navigation
-  Breadcrumb trail
-  Table of contents
-  Proper styling

## Understanding the Configuration

The configuration you added connects three things:

1. **File System** (`content/my-docs/guides/hello.md`)
   �
2. **Navigation Config** (`SIDEBAR_NAVIGATION["my-docs"]`)
   �
3. **Route** (`/my-docs/guides/hello`)

When a user visits the route, the system:

1. Loads your markdown file
2. Renders it with the layout
3. Builds sidebar navigation from your config
4. Shows breadcrumbs based on folder structure

## Next Steps

- Learn about [Groups and Entries](/docs/navigation-system/core-concepts/entries)
- Explore [Navigation Configuration](/docs/configuration/basics/sidebar-structure)
- Add more pages to grow your documentation
