API Reference Brix v#0.1.1

Copy Markdown View Source

Modules

Structured content layer for Phoenix apps.

A content author. Avatar references a media slug.

A named, filterable grouping of pages. Defined as a YAML file in collections/, resolved to matching pages at query time.

A single filter condition within a filter group.

Evaluates filter groups against a list of pages.

A group of filter conditions combined with AND or OR logic.

Shared helpers for Brix generator mix tasks.

A page layout with header and footer sections.

A media asset. Path is relative to the media directory.

SEO metadata helpers with page/collection → site fallback.

A content page. Has a slug, metadata, sections, and references to a layout, authors, and tags.

Reads content files from the filesystem into Brix structs.

Render helpers for Phoenix LiveView. Dispatches sections to your app's function components by template name.

A content section within a page or layout. Has a template name, a position (for ordering), and a map of field values.

Defines the field schema for a section type. Used by the validator to check that section content matches the expected structure.

A reusable content block that can be referenced from page sections or layout sections. Defined once in shared_sections/, referenced by name.

Site-wide settings: name, metadata, SEO defaults.

Behaviour for Brix content store backends.

File-based content store. Reads from a conventional directory layout, validates, and caches everything in ETS for fast concurrent reads.

A content tag. Slug is the identifier, display_name is for rendering.

Validates a content directory against structural rules, referential integrity, and section template schemas. Returns errors (block loading) and warnings (don't block).

A validation issue found in the content tree. Severity :error blocks loading, :warning does not.

A content version. Versions live inside a page's versions/ directory, each identified by a compact ISO timestamp (e.g. 20241001T080000Z).

Mix Tasks

Creates a new Brix page with an initial version.

Adds a section to a Brix page version.

Creates a new version of a Brix page.

Lists Brix content.

Validates a Brix content directory.