Skip to content

Publishing 0.2.2: Markdown now rendered with MDEx

Publishing 0.2.2 renders post Markdown with MDEx instead of Earmark, which is retired on Hex. MDEx already comes with PhoenixKit core, so the switch adds no new native dependency, and mix hex.audit no longer reports a retired package.

Pages look the same. The HTML differs only in small details such as whitespace and entity forms. Tables, strikethrough, autolinks and task lists are supported. A <script> inside a code block still shows as text, and raw HTML written in a post body still renders, as before.

The render cache moves to a new version, so every post is rendered once more with MDEx after the deploy instead of serving the old output.

Full release notes: Publishing 0.2.2

0.2.2 · 19 June 2026

Migrates markdown rendering from Earmark → MDEx (comrak). Earmark is retired/unmaintained on Hex, so mix hex.audit (part of precommit) now reports no retired packages. MDEx is already pulled in by phoenix_kit core, so this adds no new native footprint. No public API change — Renderer.render_markdown/1 keeps the same contract; rendered HTML is equivalent (the markdown→HTML output differs only cosmetically: whitespace, <img /> self-closing, entity normalization).

Changed

  • Renderer now renders markdown with MDEx (render: [unsafe: true], smart punctuation, GFM tables/strikethrough/autolinks/task lists). The GFM tagfilter extension is intentionally left off to preserve the documented admin trust boundary (a pasted <script> still renders live).
  • Code-fence handling is simpler and safer. comrak always HTML-escapes fenced/inline code content, so the plain path no longer pre-escapes; a raw <script> inside a fence still renders as literal text. The mixed (component) path masks only the < of components shown literally inside code so the component scanner skips them, then restores it before MDEx (which escapes it) — replacing the old entity pre-escaping that MDEx would double-escape.
  • Render cache version bumped v4 → v5 so Earmark-rendered entries are dropped and re-rendered with MDEx instead of served stale.
  • Dependency: dropped {:earmark, "~> 1.4"}, added {:mdex, "~> 0.13"}.

Fixed

  • Test harness no longer crashes when psql is absent — it now degrades to “integration tests excluded” so the Level 1 (pure) suite still runs.

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