[0.1.0] - 2026-04-27
Added
use PhoenixPageMetamacro — single line of setup inMyAppWeb.PageMeta. Injects@behaviour PhoenixPageMeta.Site,breadcrumbs/1andactive?/2,3wrappers (pattern-matched to the project struct), defaultbase_url/0andlang_path/2(bothdefoverridable), and@after_compilefield validation.PhoenixPageMeta.Breadcrumb— struct (:title,:path,:first?,:last?,:page_meta) +build/1(walks:parentchain, filters:skip_breadcrumb).PhoenixPageMeta.Components.Breadcrumbs.list/1— slot-based HEEx component owning<nav aria-label>,aria-current="page", and divider placement. Accepts:restglobals (e.g.class).PhoenixPageMeta.Components.MetaTags.default/1— HEEx component rendering description, Open Graph (og:type,og:url,og:title,og:description,og:image,og:image:alt,og:site_name,og:locale,og:locale:alternate), Twitter Card (twitter:card,twitter:title,twitter:description,twitter:image,twitter:site), JSON-LD, canonical, and hreflang alternate tags. Reads optional fields withMap.get/2.- URL fields (
og_image,canonical_path) auto-prefixed withbase_urlwhen relative. Absolute URLs (http:///https://) rendered as-is. - New struct fields recognised by
MetaTags::site_name(rendersog:site_name),:twitter_site(renderstwitter:site),:og_image_alt(rendersog:image:alt, falls back to:title),:locale(rendersog:localeand derivesog:locale:alternatefrom the rest of:supported_locales). PhoenixPageMeta.active?/2,3— link path matching against the current page (exact:andquery:opts), with slash-boundary prefix matching.PhoenixPageMeta.Site— behaviour for site-wide callbacks (base_url/0,lang_path/2).PhoenixPageMeta.LiveView— behaviour for the per-LiveViewpage_meta/2callback, plusassign_page_meta/1helper.- Components dispatch site-wide callbacks via
page_meta.__struct__— no global config. :base_urloption onuseaccepts a string or a 0-arity function capture. When omitted, the macro guessesMyAppWeb.Endpoint.url()from the namespace.:lang_path/2default does locale-prefix swap; override for non-prefix locale schemes.