The three-level template lookup: site overlay → theme → framework.
Three levels, never more (Hugo's specificity matrix is the cautionary
tale), and always printable via cherry theme.which. Overlays are keyed
per-theme (themes/<theme-name>/templates/…) so swapping themes never
silently applies overrides written for a different theme.
Summary
Functions
The full lookup chain for a template: {level, path, exists?} in
priority order. The first existing entry wins.
Where a site's overlay file for this theme + template would live.
Resolves a template to the winning {level, path}.
Functions
@spec chain(Cherry.Site.t(), Cherry.Theme.t(), atom()) :: [ {atom(), Path.t(), boolean()} ]
The full lookup chain for a template: {level, path, exists?} in
priority order. The first existing entry wins.
@spec overlay_path(Cherry.Site.t(), Cherry.Theme.t(), atom()) :: Path.t()
Where a site's overlay file for this theme + template would live.
@spec resolve(Cherry.Site.t(), Cherry.Theme.t(), atom()) :: {:ok, {atom(), Path.t()}} | {:error, String.t()}
Resolves a template to the winning {level, path}.