to navigate
to select
esc to close
Core Concepts Intermediate

URL Routing Guide

Understand how URLs are generated and managed in Airogel CMS, including root routing for home pages

Overview

Airogel CMS uses a flexible routing system where Collections define URL patterns and Content Paths store the resolved URLs.

Routing Patterns

Collections use placeholders to generate URLs:

  • :handle - Entry slug
  • :year - 4-digit year from published_at
  • :month - 2-digit month
  • :day - 2-digit day
  • :field_handle - Handle of referenced entry (entity fields)

Examples

  • blog/:handle → /blog/my-post
  • :year/:month/:handle → /2025/06/hello
  • :handle → /about
  • units/:unit/lessons/:handle → /units/unit-1/lessons/lesson-1

Root Collections (Home Page)

A collection serving the site root URL (/) needs ALL THREE of these:

  1. routing: ":handle" — NOT empty string ""
  2. root_routing: true
  3. An entry with handle "index"

Setup Example

Collection:

handle: home
name: Home
routing: ":handle"
root_routing: true
template_handle: index
layout_handle: theme

Entry:

handle: index
title: Home

The entry with handle index will be accessible at /index (content_path: /index).

Common Mistake

Do NOT use routing: "" (empty string) for a root collection. Empty string routing is for collection index pages (e.g., a blog listing at /blog). It does NOT define how / maps to an entry.

You need routing: ":handle" so the index entry resolves to /index, and root_routing: true makes / work as an alias.

Index Pages

Collections can have paginated index pages showing all published entries at URLs like /blog and /blog/page/2.