Publishing 0.1.16: OpenGraph tags out of the box and images that survive key changes
Publishing 0.1.16 makes social previews work without any setup: public listing and post pages now carry OpenGraph and Twitter Card tags. If your layout already renders them, turn off In-Page OpenGraph Tags in the Publishing settings.
Images inside posts now keep working after a change of URL prefix or secret_key_base. New images are inserted as <Image file_uuid="…"/> and get their URL when the page renders. Older posts stored a fixed signed URL, which broke after such a change; the renderer now repairs those links on the fly, without a data migration. The render cache moves to a new version, so every post is rendered again once.
Also: relative SEO images become absolute URLs, a notice appears when an automatic slug had to be shortened, and error messages in the editor say what went wrong, such as “Couldn’t save this post.” followed by the reason.
Full release notes: Publishing 0.1.16
0.1.16 · 10 June 2026
PR #24 — editor & public-rendering sweep: stable inline images, legacy image-URL healing at render, automatic in-page OpenGraph, descriptive error flashes, and slug-cap safety. Plus a post-merge crash fix. Built against phoenix_kit ~> 1.7.138 and phoenix_live_view 1.2.
Added
- Automatic in-page OpenGraph + Twitter Card tags on public listing + post pages (
publishing_render_og_tags, default on) so social previews work with zero host<head>setup; a Settings toggle disables the in-page copy when the host renders the forwarded:ogassign itself. The:ogbuilder is hardened — relative SEO images normalize to absolute (no morehttps://hostimages/...), andog:localeis emitted in OpenGraph’slanguage_TERRITORYform. - Auto-slug truncation warning — a non-blocking flash when an automatic slug is shortened to fit the cap (e.g. a long Cyrillic title that transliteration expands,
щ → shch), transition-gated so live typing past the cap doesn’t spam it.
Changed
- Inline post images insert as
<Image file_uuid="…"/>components, not a frozen signed URL — resolved to a URL at render time, so they surviveurl_prefixchanges andsecret_key_baserotation (the same late resolution the featured image already used). Alt text derives from the file’s original name. Drops the client-sideeval()used for image insertion in favour of a typedphx:insert-mediaevent. - Editor & admin error flashes are descriptive — generic catch-alls now route through
Publishing.Errors(e.g. “Couldn’t save this post. Database update failed.”) instead of flat “Failed to …” strings, including an%Ecto.Changeset{}clause that renders a humanized, capped field summary. - The auto-generated slug cap is derived from the save limit —
min(SEO 200, Constants.max_slug_length), so a generated slug provably can’t exceed what save accepts. - Bumped dependencies:
phoenix_kit1.7.138,phoenix_live_view1.2,phoenix_kit_ai0.8,phoenix1.8.8,leaf0.2.23. Addedhex.audittomix precommit.
Fixed
- Legacy signed-file image URLs heal at render time — posts authored before the
<Image>change stored a fully-resolved/<old-prefix>/file/…URL that 404s after a prefix change or secret rotation. The renderer recovers the UUID + variant and re-signs against the current prefix/secret — no data migration, idempotent for current output, external/protocol-relative URLs untouched. The render cache key is now prefix- and secret-aware (bumped tov3). Errors.message/1no longer crashes the flash on a changeset whose error opt carries a list value (e.g. an inclusion/subsetenum):to_string/1raisesArgumentErrorthere, which is now caught alongside the existing tuple/Protocol.UndefinedErrorcase.
Publishing 0.1.16. Install or update: {:phoenix_kit_publishing, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.