# Brix v0.1.1 - API Reference

## Modules

- [Brix](Brix.md): Structured content layer for Phoenix apps.
- [Brix.Author](Brix.Author.md): A content author. Avatar references a media slug.

- [Brix.Collection](Brix.Collection.md): A named, filterable grouping of pages. Defined as a YAML file in
`collections/`, resolved to matching pages at query time.
- [Brix.Collection.Condition](Brix.Collection.Condition.md): A single filter condition within a filter group.
- [Brix.Collection.FilterEngine](Brix.Collection.FilterEngine.md): Evaluates filter groups against a list of pages.
- [Brix.Collection.FilterGroup](Brix.Collection.FilterGroup.md): A group of filter conditions combined with AND or OR logic.
- [Brix.Gen](Brix.Gen.md): Shared helpers for Brix generator mix tasks.

- [Brix.Layout](Brix.Layout.md): A page layout with header and footer sections.

- [Brix.Media](Brix.Media.md): A media asset. Path is relative to the media directory.

- [Brix.Meta](Brix.Meta.md): SEO metadata helpers with page/collection → site fallback.

- [Brix.Page](Brix.Page.md): A content page. Has a slug, metadata, sections, and references
to a layout, authors, and tags.

- [Brix.Reader](Brix.Reader.md): Reads content files from the filesystem into Brix structs.
- [Brix.Render](Brix.Render.md): Render helpers for Phoenix LiveView. Dispatches sections to
your app's function components by template name.

- [Brix.Section](Brix.Section.md): A content section within a page or layout. Has a template name,
a position (for ordering), and a map of field values.

- [Brix.SectionTemplate](Brix.SectionTemplate.md): Defines the field schema for a section type. Used by the validator
to check that section content matches the expected structure.

- [Brix.SharedSection](Brix.SharedSection.md): A reusable content block that can be referenced from page sections
or layout sections. Defined once in `shared_sections/`, referenced by name.

- [Brix.Site](Brix.Site.md): Site-wide settings: name, metadata, SEO defaults.

- [Brix.Store](Brix.Store.md): Behaviour for Brix content store backends.
- [Brix.Store.Filesystem](Brix.Store.Filesystem.md): File-based content store. Reads from a conventional directory layout,
validates, and caches everything in ETS for fast concurrent reads.

- [Brix.Tag](Brix.Tag.md): A content tag. Slug is the identifier, display_name is for rendering.

- [Brix.Validator](Brix.Validator.md): Validates a content directory against structural rules, referential integrity,
and section template schemas. Returns errors (block loading) and warnings (don't block).

- [Brix.Validator.Issue](Brix.Validator.Issue.md): A validation issue found in the content tree.
Severity `:error` blocks loading, `:warning` does not.

- [Brix.Version](Brix.Version.md): A content version. Versions live inside a page's `versions/` directory,
each identified by a compact ISO timestamp (e.g. `20241001T080000Z`).

## Mix Tasks

- [mix brix.gen.page](Mix.Tasks.Brix.Gen.Page.md): Creates a new Brix page with an initial version.
- [mix brix.gen.section](Mix.Tasks.Brix.Gen.Section.md): Adds a section to a Brix page version.
- [mix brix.gen.version](Mix.Tasks.Brix.Gen.Version.md): Creates a new version of a Brix page.
- [mix brix.list](Mix.Tasks.Brix.List.md): Lists Brix content.
- [mix brix.validate](Mix.Tasks.Brix.Validate.md): Validates a Brix content directory.

