A theme: a directory carrying a theme.exs manifest (ADR 0004).
The manifest declares the contract version, the template inventory
(fixed names, fixed assigns — that is why swapping works), and the
token manifest. Themes are plain directories so binary-mode sites get
full themes; the default theme ships in Cherry's priv/ and goes
through the exact same loader — theme #1, not privileged code.
Summary
Functions
Names of the official themes shipped in Cherry's priv/, sorted.
The directory a built-in theme of this name would live in.
The directory of the built-in default theme.
Loads and conformance-checks a theme directory.
Resolves and loads the active theme for a site.
The template names every contract-1.x theme must provide.
Absolute path of a template file inside this theme.
Checks a site's tokens: overrides against this theme's manifest.
Types
Functions
@spec builtin_names() :: [String.t()]
Names of the official themes shipped in Cherry's priv/, sorted.
The directory a built-in theme of this name would live in.
@spec default_root() :: Path.t()
The directory of the built-in default theme.
Loads and conformance-checks a theme directory.
@spec load_active(Cherry.Site.t()) :: {:ok, t()} | {:error, String.t()}
Resolves and loads the active theme for a site.
A bare name matching an official theme ("default", "cherrybomb")
loads the built-in; any other value is a directory (relative to the
site root) containing a theme.exs.
@spec required_templates() :: [atom()]
The template names every contract-1.x theme must provide.
Absolute path of a template file inside this theme.
Checks a site's tokens: overrides against this theme's manifest.
Every override must name a declared token — the manifest is the theme's public styling API, and a silent typo would look like Cherry ignoring the user. Unknown names error with the nearest declared token.