All notable changes to this project will be documented in this file.
0.1.0 - 2026-07-04
Added
- WYSIWYG SVG canvas editor for OpenGraph image templates — text, image, rect,
and stamp elements, with
{{slot}}(consumer-wired) and[[global]](site_url, site_host, site_name, page_url, page_locale) variable syntax - Hierarchical template assignment system (e.g.
post → group → default); admin modal for CRUD plus live preview against a real published resource - SVG → PNG rendering pipeline (
Render.render_url/2): prefers the:resvgNIF, falls back to theresvgCLI,rsvg-convert, or ImageMagick; disk cache keyed by a SHA-256 of(template, canvas, values, module_key) refine_og/4integration seam for consumer modules — kill-switch viaenabled?/0, pass-through on any resolution error or missing template so a public page render can never crash on OG renderingpreview_og_image_url/3for consumer editors to show "what the plugin will produce" without swapping the live OG imageGET /phoenix_kit/og-image/:keyimage controller —image/pngwithout a charset suffix (Telegram drops previews on binary MIME with a text charset), 30-day immutable cache headers, configurable cache directory- Consumer opt-in via two callbacks on the consumer's
PhoenixKit.Moduleimplementation:og_variables/0(declares available variables) andog_resolve/2(fetches values at render time); first consumer wired up isphoenix_kit_publishing - Activity logging for template and assignment CRUD
- Admin dashboard integration: OpenGraph overview tab plus Templates and Assignments subtabs
phoenix_kit_og_templatesandphoenix_kit_og_assignmentsschemas (migration V139), with a partial-unique-index pair so Postgres NULLscope_uuid(module-wide default) and per-scope assignments don't collide
Fixed
- The template editor's
/newroute no longer leaks an orphaned template row on every fresh page load — creation is now gated onconnected?/1since LiveView mounts twice (disconnected + connected) for a full page load Render.Svgno longer hardcodeshttp://localhost:4000for host-relative image sources (e.g. the signed local-storage fallback URL); it now degrades the same way any other unresolvable image href does