Content Collections

Configure content collections in your seite static site: posts, docs, pages, changelog, roadmap, and trust center, with pagination, RSS, and subdomain support.

Collections are the core content model in seite. The static site generator ships six collection presets that handle common patterns, from date-ordered blog posts to nested documentation, so you can start writing content immediately.

Overview

Collections are groups of related content. Each collection has its own directory under content/, URL prefix, and template. Five presets are available:

PresetDirectoryDatedRSSListedNestedURL Pattern
postscontent/posts/YesYesYesNo/posts/slug
docscontent/docs/NoNoYesYes/docs/slug
pagescontent/pages/NoNoNoNo/slug
changelogcontent/changelog/YesYesYesNo/changelog/slug
roadmapcontent/roadmap/NoNoYesNo/roadmap/slug
trustcontent/trust/NoNoYesYes/trust/slug

Defining Collections

Collections are configured in seite.toml (created during seite init):

[[collections]]
name = "posts"

[[collections]]
name = "docs"

[[collections]]
name = "pages"

Each preset comes with sensible defaults. You can override any field:

[[collections]]
name = "posts"
label = "Blog"
paginate = 10

Collection Fields

FieldTypeDefaultDescription
namestringrequiredCollection identifier
labelstringcapitalized nameDisplay name in templates
directorystringnameContent directory under content/
url_prefixstring/nameURL prefix for items
default_templatestringpreset-basedTemplate file for rendering
has_dateboolpreset-basedItems have dates
has_rssboolpreset-basedInclude in RSS feed
listedboolpreset-basedShow on index page
nestedboolpreset-basedSupport subdirectories as groups
paginateintnoneItems per page (enables pagination)
subdomainstringnoneDeploy to {subdomain}.{base_domain}
subdomain_base_urlstringnoneExplicit URL override for subdomain (e.g., https://docs.example.com)
deploy_projectstringnoneCloudflare/Netlify project for subdomain

Posts

Posts are date-based content. Filenames should include the date:

content/posts/
├── 2026-01-15-hello-world.md
├── 2026-02-01-rust-tips.md
└── 2026-02-18-new-feature.md

The date is parsed from the filename (YYYY-MM-DD-slug.md) or from frontmatter. Posts are sorted by date (newest first) and included in the RSS feed.

Tip

Use seite serve --drafts to preview draft posts during development. Drafts are excluded from production builds by default.

Docs

Docs support nested directories for grouped navigation:

content/docs/
├── getting-started.md
├── guides/
│   ├── setup.md
│   └── advanced.md
└── reference/
    ├── api.md
    └── config.md

Nested docs get URLs like /docs/guides/setup: the docs theme shows a sidebar with sections grouped by directory.

Info

Subdirectories automatically become sidebar sections. Create content/docs/guides/ and every markdown file inside it appears under a "Guides" heading in the sidebar navigation.

By default, docs are sorted alphabetically by title. Use weight in frontmatter to control the order:

---
title: "Getting Started"
weight: 1
---

Lower values appear first. Items without weight sort alphabetically after all weighted items. This lets you create a guided learning path instead of a plain alphabetical list.

Pages

Pages are standalone content at root URLs. They're unlisted (not shown on the index page):

content/pages/
├── about.md        → /about
├── contact.md      → /contact
└── index.md        → / (homepage content)

The special file content/pages/index.md injects its content into the homepage template as {{ page.content }}.

Changelog

The changelog collection is for release notes and version history. Entries are date-based with RSS support, so users can subscribe to updates.

content/changelog/
├── 2026-01-15-v0-1-0.md
├── 2026-02-01-v0-2-0.md
└── 2026-02-18-v1-0-0.md

Use tags to categorize changes. Tags render as colored badges in the changelog templates:

  • new: new features (green)
  • fix: bug fixes (blue)
  • breaking: breaking changes (red)
  • improvement: enhancements (purple)
  • deprecated: deprecations (gray)
seite new changelog "v1.0.0" --tags new,improvement

Roadmap

The roadmap collection is for sharing your project's public roadmap. Items are ordered by weight (not date) and grouped by status tags.

content/roadmap/
├── dark-mode.md
├── api-v2.md
└── initial-release.md

Use tags for status and weight for priority ordering within each group:

  • planned: upcoming work
  • in-progress: actively being worked on
  • done: completed
  • cancelled: no longer planned
---
title: "Dark Mode"
tags:
  - planned
weight: 1
---

Three index layouts are available. The default groups items by status. To switch layouts, create templates/roadmap-index.html:

{# Kanban board (3-column CSS grid): #}
{% extends "roadmap-kanban.html" %}

{# Or timeline (vertical milestones): #}
{% extends "roadmap-timeline.html" %}
seite new roadmap "Feature Name" --tags planned

Subdomains

Any collection can be deployed to its own subdomain. Set subdomain on the collection:

[[collections]]
name = "docs"
subdomain = "docs"           # → docs.example.com
deploy_project = "my-docs"   # optional: Cloudflare/Netlify project name

When subdomain is set:

  • The collection gets its own output directory: dist-subdomains/docs/
  • Its base URL becomes https://docs.{base_domain}
  • Content is served at the subdomain root (no URL prefix)
  • It gets its own sitemap, RSS, robots.txt, llms.txt, and search index
  • It's excluded from the main site's build output

Subdomain Root Page

To customize what appears at the subdomain root (e.g., docs.example.com/), create content/{collection}/index.md:

content/docs/index.md    → docs.example.com/  (subdomain root)

The index.md content is injected into the index template as {{ page.content }}, exactly like content/pages/index.md works for the main site homepage. This lets you add a custom hero, introduction, or landing page above the collection listing. Without an index.md, the subdomain root shows a plain collection listing.

If your base_url contains www (e.g., https://www.example.com), the auto-derived URL would be docs.www.example.com. Use subdomain_base_url to set an explicit override:

[[collections]]
name = "docs"
subdomain = "docs"
subdomain_base_url = "https://docs.example.com"  # explicit override
deploy_project = "my-docs"

The dev server previews subdomain content at /{name}-preview/ (e.g., localhost:3000/docs-preview/).

Deploy with seite deploy: subdomain collections are deployed automatically after the main site. GitHub Pages does not support per-collection subdomains; use Cloudflare Pages or Netlify. See the Deployment guide for platform-specific setup.

Collection Index Pages

Any collection can have a custom index page by creating content/{collection}/index.md. This content is injected into the collection's index template as {{ page.content }}:

content/docs/index.md        → /docs/     (collection index)
content/changelog/index.md   → /changelog/ (collection index)

This works identically to how content/pages/index.md provides content for the site homepage. The index.md is extracted from the collection. It won't appear as a regular item in listings. All frontmatter fields are available in the template context (page.title, page.description, page.extra, etc.).

For paginated collections, the index.md content appears only on page 1.

Docs Index with Sidebar

The docs collection ships a dedicated docs-index.html template that renders the same sidebar navigation as individual doc pages. When using the docs theme:

  • With index.md: Shows your custom content alongside the sidebar
  • Without index.md: Auto-generates a section overview grouped by subdirectory

The sidebar nav ({{ nav }}) is available in all collection index templates, so custom templates can also render it.

Redirect to a Specific Page

Instead of showing custom content, you can redirect the collection index to an existing page using redirect_to in the extra field:

---
title: Docs
extra:
  redirect_to: /docs/getting-started
---

This generates an instant redirect at /docs//docs/getting-started. This is the most common pattern for docs sites: route the docs landing page directly to the first doc.

Redirects work for both regular collection indexes and subdomain roots.

Pagination

Enable pagination on any listed collection:

[[collections]]
name = "posts"
paginate = 10

This generates:

  • /posts/: page 1
  • /posts/page/2/: page 2
  • /posts/page/3/: page 3, etc.

Templates receive pagination context:

{{ pagination.current_page }}
{{ pagination.total_pages }}
{{ pagination.prev_url }}
{{ pagination.next_url }}

Singular/Plural

Both seite new post and seite new posts work. The CLI normalizes singular to plural automatically.

Tag Pages

Tags are collected from all posts and generate archive pages:

  • /tags/: tag index with all tags and counts
  • /tags/rust/, all posts tagged "rust"

Tag pages are i18n-aware and included in the sitemap.

Next Steps

  • Configuration: full reference for all collection fields and site settings
  • Templates & Themes: customize how collections are rendered
  • Shortcodes: add rich content like videos, callouts, and figures to your pages