> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blode.md/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Content types

Use collections to publish blogs, courses, products, and more alongside your docs.

Blode.md supports more than just documentation. You can publish blogs, courses, product pages, and other content types by defining collections in your configuration. Each collection has its own content directory, URL prefix, and navigation structure.

## Define a collection

Collections use the SiteConfig format with a top-level `collections` array. Each collection is an object with its own `id`, `type`, and content root:

```json title="docs.json"
{
  "collections": [
    {
      "id": "docs",
      "type": "docs",
      "root": "content/docs",
      "slugPrefix": "/docs",
      "navigation": {
        "groups": [
          { "group": "Getting started", "pages": ["index", "quickstart"] }
        ]
      }
    },
    {
      "id": "blog",
      "type": "blog",
      "root": "content/blog",
      "slugPrefix": "/blog",
      "sort": "date:desc",
      "index": true
    }
  ]
}
```

## Collection properties

- `id` (type: string, required: true): Unique identifier for the collection.
- `type` (type: string, required: true): The content type. Determines which frontmatter fields are available and how pages are rendered.
- `root` (type: string, required: true): Path to the content directory for this collection, relative to the project root.
- `slugPrefix` (type: string): URL prefix for all pages in this collection.
- `navigation` (type: object): Navigation structure for this collection. Same format as the top-level navigation.
- `sort` (type: string): Sort order for listing pages. Format: "field:direction" (e.g., "date:desc").
- `index` (type: boolean, default: false): Whether to auto-generate an index page listing all pages in the collection.

## Available types

| Type       | Use case                                |
| ---------- | --------------------------------------- |
| `site`     | General-purpose website pages           |
| `docs`     | Documentation with sidebar navigation   |
| `blog`     | Blog posts sorted by date               |
| `courses`  | Ordered learning content with progress  |
| `products` | Product pages with pricing and metadata |
| `notes`    | Short-form notes and snippets           |
| `forms`    | Form pages with input fields            |
| `sheets`   | Spreadsheet-style data pages            |
| `slides`   | Presentation slides                     |
| `todos`    | Task lists and checklists               |

## Type-specific frontmatter

Each collection type supports additional frontmatter fields beyond the standard `title` and `description`.

```mdx title="Blog post"
---
title: Launch week recap
description: Everything we shipped this week.
date: 2025-01-15
tags:
  - announcements
  - releases
author: Jane Smith
image: /images/launch-week.png
---
```

```mdx title="Course lesson"
---
title: Your first lesson
description: Getting started with the basics.
order: 1
duration: 5m
---
```

```mdx title="Product page"
---
title: Pro plan
description: For growing teams.
price: 49
currency: USD
sku: PRO-001
---
```

## Full example

Here is a complete `docs.json` that defines both documentation and a blog:

```json title="docs.json"
{
  "name": "My Project",
  "slug": "my-project",
  "collections": [
    {
      "id": "docs",
      "type": "docs",
      "root": "content/docs",
      "slugPrefix": "/docs",
      "navigation": {
        "groups": [
          { "group": "Getting started", "pages": ["index", "quickstart"] },
          { "group": "Guides", "pages": ["guides/setup", "guides/deploy"] }
        ]
      }
    },
    {
      "id": "blog",
      "type": "blog",
      "root": "content/blog",
      "slugPrefix": "/blog",
      "sort": "date:desc",
      "index": true
    }
  ]
}
```

> [!INFO]
> When you use the `collections` array, it replaces the top-level `navigation`
>   field. Each collection manages its own navigation independently.