Skip to content

Publishing 0.2.3: OpenGraph overrides per post and canonical URLs fixed

Publishing 0.2.3 fixes canonical URLs on public Publishing pages. These pages did not set :url_path, so a host layout that builds its canonical, og:url and hreflang tags from it pointed every page at /. On at least one live site this dropped pages from Google’s index as duplicates.

Also in this release:

  • The editor has a new Social / OpenGraph panel to override a post’s title, description and image for social sharing, per language. Leave a field blank to use the post’s own.
  • og:image:width, og:image:height and og:image:type are added when the image’s size is known.
  • Slugs generated from a title or a translation are now at most about 60 characters, down from 200. A slug you type yourself is not affected.
  • A group slug that matches another module’s reserved route, such as legal, no longer takes over that module’s pages.
Full release notes: Publishing 0.2.3

0.2.3 · 3 July 2026

PRs #27–#29 — a phoenix_kit_og integration seam (per-post OG-image template wiring, editor OG-override panel), a lower SEO-friendly auto-slug cap, a missing :url_path assign that broke canonical URLs on public controller pages, and route-prefix collisions with other modules’ reserved routes. Plus a post-merge review pass. Built against phoenix_kit ~> 1.7.170.

Added

  • phoenix_kit_og template-wiring seam — Publishing.og_variables/0 + og_resolve/2 expose post title/description/URL/featured image/group name/group slug/first-words/published-date for a future OG-image plugin to bind to template slots. A per-language OG override (title/description/image) is editable from the editor’s new “Social / OpenGraph” panel and layered into the existing og:* meta tags (module override → per-post override → derived default). No-op until phoenix_kit_og is installed.
  • og:image:width / og:image:height / og:image:type meta tags when the featured (or overridden) image’s dimensions are available.

Changed

  • Auto-generated slug cap lowered 200 → 60 chars (SEO guidance — Ahrefs/Moz/Yoast/Semrush converge on 50–75). Applies only to slugs derived from titles / AI translation / transliteration; a human-typed slug is still bounded by the 500-char save limit.

Fixed

  • Public controller pages now assign :url_path so host root layouts building canonical/og:url/hreflang tags from it don’t fall back to "/" on every publishing-served page (this dropped /legal/*-style pages from Google’s index as canonical duplicates on at least one production site).
  • A group slug that collides with another module’s reserved top-level route is no longer claimed by the group-dispatch catch-all, even when a same-named group genuinely exists in publishing’s own data — closes a hole where e.g. a phoenix_kit_legal-reserved "legal" path could be hijacked by publishing’s generic post view instead of the owning module’s page.
  • Three og_resolve/2 variables that were silently dead (post_url, post_group_name, post_group_slug always resolved to nil — the metadata keys they read don’t exist on the post map) — found and fixed in post-merge review, before anything depended on them.
  • credo --strict violation in the new OG-image-metadata code (unaliased nested module reference).
  • mix dialyzer was failing outright on this branch (the optional PhoenixKitOg calls plus two dead-code branches in the new OG-image logic). Added .dialyzer_ignore.exs for the optional-module warnings (matching the pattern already used by sibling phoenix_kit_* repos) and removed the unreachable branches.

Publishing 0.2.3. Install or update: {:phoenix_kit_publishing, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.