Directory Tree
Overview
Full directory layout
priv/content/
├── site.yml
├── authors/
│ └── {slug}.yml
├── tags/
│ └── {slug}.yml
├── media/
│ ├── {slug}.yml
│ └── files/
│ └── {path}
├── templates/
│ └── sections/
│ └── {template_name}.yml
├── layouts/
│ └── {layout_name}.yml
├── shared_sections/
│ └── {name}.yml
├── collections/
│ └── {slug}.yml
└── pages/
└── {slug}/
├── page.yml
└── versions/
└── {YYYYMMDDTHHMMSSz}/
├── version.yml
└── sections/
├── 01-{name}.yml
├── 02-{name}.md
└── 03-{name}.{field}.mdNaming conventions
| Resource | Key derived from |
|---|---|
| Pages | Directory path |
| Authors | Filename sans .yml |
| Tags | Filename sans .yml |
| Media | Filename sans .yml |
| Layouts | Filename sans .yml |
| Shared sections | Filename sans .yml |
| Collections | Filename sans .yml |
Site & Globals
site.yml and global resources
site.yml
name: My Site
tagline: A brief tagline
meta_title: SEO title
meta_description: SEO description
domain: example.com
og_image: og-default
favicon: faviconauthors/{slug}.yml
name: Maya Johnson
bio: Author biography text
avatar: maya-avatar
url: https://example.com
# extra: (any additional fields)tags/{slug}.yml
display_name: Coffeemedia/{slug}.yml
path: files/hero.jpg
alt: Descriptive alt text
caption: Optional caption
content_type: image/jpeg
# extra: (any additional fields)Media files live in media/files/ alongside the YAML metadata.
Layouts
Layout definitions
Inline sections
# layouts/default.yml
header_sections:
- template: nav
fields:
links:
- label: Home
url: /
- label: Blog
url: /blog
footer_sections:
- template: footer
fields:
copyright: "2025 My Site"Shared section references
# layouts/default.yml
header_sections:
- shared_section: main-nav
footer_sections:
- shared_section: site-footerShared section refs are resolved at load time — the final Layout struct contains full Section structs.
Shared Sections & Collections
Reusable content blocks and page groupings
shared_sections/{name}.yml
# shared_sections/main-nav.yml
template: nav
fields:
links:
- label: Home
url: /
- label: Blog
url: /blogReferenced in layouts via shared_section: main-nav.
collections/{slug}.yml
# collections/blog.yml
name: Blog
filters:
prefix: /blog/
tag: coffee
author: maya
sort_by: published_at # slug | title | published_at | updated_at
sort_direction: desc # asc (default) | desc
# SEO (optional, used by Brix.Meta.field/3)
meta_title: Blog Posts
meta_description: All blog posts
og_title: Blog
og_description: Read our blog
og_image: blog-ogSection Templates
Field type definitions
templates/sections/{name}.yml
# templates/sections/hero.yml
fields:
heading:
type: string
required: true
subheading:
type: string
body:
type: richtext
image:
type: media
link_url:
type: url
visible:
type: boolean
count:
type: integer
items:
type: list
of: map
metadata:
type: mapSupported field types
| Type | Description |
|---|---|
string | Plain text |
richtext | Markdown converted to HTML at load |
media | Media slug reference |
url | URL string |
boolean | true / false |
integer | Numeric value |
list | List of items (optional of: subtype) |
map | Key-value object |
Pages
Page directory layout with versions
page.yml
# pages/blog/hello/page.yml
title: Hello World
layout: default
authors:
- maya
tags:
- coffee
- travel
published_version: "20240315T090000Z"
# SEO (optional)
meta_title: Hello World - Blog
meta_description: A post about coffee
og_title: Hello World
og_description: A post about coffee
og_image: hello-og
# Old URLs that redirect here
slug_history:
- /old-hello
- /posts/helloversion.yml
# pages/blog/hello/versions/20240315T090000Z/version.yml
published_at: "2024-03-15T09:00:00Z"
updated_at: "2024-03-15T09:00:00Z"Slug derivation
| Directory path | Slug |
|---|---|
pages/index/ | / |
pages/about/ | /about |
pages/blog/hello/ | /blog/hello |
Publishing states
published_at | Status |
|---|---|
absent / nil | Draft |
| Future datetime | Scheduled |
| Past datetime | Published |
Section Files
Three file formats for sections
YAML section
# sections/01-hero.yml
template: hero
fields:
heading: Welcome
subheading: To my site
image: hero-imagePosition extracted from filename prefix (01- -> position 1).
Standalone markdown
# sections/02-intro.md
---
template: richtext
---
This is the body with **bold** and *italic*.Template from frontmatter or filename. The entire markdown body becomes the section's content field.
Mixed: YAML + markdown field
# sections/03-cta.yml
template: cta
fields:
heading: Call to Action
button_text: Learn More# sections/03-cta.body.md
Rich **markdown** content for the `body` field.The .body.md file merges into the body key of the YAML section's fields. The source_fields map preserves the raw markdown before HTML conversion.