Skip to content

Publishing 0.13.0: Unique post views, sitemap exclusions and safer editor saves

Publishing 0.13.0 stops counting repeated views from visitors without a session cookie, lets you leave a group or a single post out of the sitemap, and makes the editor collect your last keystrokes before it switches language or version.

Unique views

A view was already counted once per session per day, but a visitor without a session cookie, such as a script or a fresh session, counted on every request. The Publishing settings page now has a Unique Views switch, on by default. When it is on, such a visitor is recognised by a keyed hash of their address and counts once per post per day. Raw addresses are not stored. The hashes are kept in memory with a size limit; when it is full, views keep counting without remembering more visitors. Turn the switch off to count every time the page is opened.

Keep pages out of the sitemap

The group edit form has a new Exclude this group from the sitemap option: neither the listing nor any post in the group is listed. In the post editor, Exclude from the sitemap leaves one post out of the sitemap while it stays public at its URL. Core’s sitemap reads both settings.

Editor saves and switches

Switching language or version now replaces the document shown in the editor and first collects any keystrokes still in the browser. Preview, translation and creating a version wait for them too, so the latest text is what gets copied. If the browser does not answer, a waiting indicator appears after 1.5 seconds and the action is cancelled after 6 seconds. When the editor sends back unchanged text, it no longer overwrites the stored Markdown with a normalised copy.

Public pages and caching

  • Canonical redirects keep the query string without looping, and dialects with their own URL segment redirect their full-code URLs to it.
  • A missing translation now redirects temporarily to the fallback, also for version URLs.
  • A page whose image lookup failed is no longer kept in the render cache, so it renders again on the next request. This needs core 2.41.1 or later.
  • Saving a post clears all of its cached renders.
  • Public URLs use the configured site URL or the endpoint URL.

Admin forms, dialogs, tabs and empty states now use core’s components, and changes to categories show up on other open category pages.

Upgrading

Run mix phoenix_kit.update to apply the module’s migration V2. It adds two indexes for group and version media folders and changes no tables or content. The core requirement stays at 2.38.0.

Code that calls the module directly must follow some renames: Publishing.get_published_version/2 and Versions.get_published_version/2 become fetch_published_version/2, and Categories.get_category/1 becomes fetch_category/1. fetch_option/2 is now get_option/2. Groups.get_group/1 still works but is deprecated in favour of fetch_group/1. A few unused PubSub helpers and the facade’s broadcast_version_created/3 were removed.

Unique views are on after the upgrade: visitors without a session cookie, such as a script requesting a page in a loop, now count once a day instead of on every request.

Full release notes: Publishing 0.13.0

0.13.0 · 27 September 2026

Added

  • Per-day, address-based deduplication for cookieless post views, controlled by publishing_unique_views (default on). Visitor identifiers are keyed hashes held in a bounded ETS table; raw addresses are not stored. At capacity, views continue counting without retaining additional identifiers.
  • Group and post sitemap_exclude settings exposed to core’s Sitemap source.
  • Migration V2 adds expression indexes for group and version media-folder pointers. Run mix phoenix_kit.update in the host app to apply them. No tables, columns, or content rows change; rollback removes the matching indexes only.
  • Category changes broadcast to other open category administration pages.

Changed

  • Admin forms, dialogs, tabs, and empty states use core components.
  • Lookup APIs returning result tuples use fetch_* names. Callers must replace Publishing.get_published_version/2 and Versions.get_published_version/2 with fetch_published_version/2, and Categories.get_category/1 with fetch_category/1. Groups.get_group/1 and the facade delegate remain as deprecated aliases for fetch_group/1. The option helper fetch_option/2 is now get_option/2 in Shared, Groups, and the facade.
  • Removed the facade’s broadcast_version_created/3 delegate and unused PubSub helpers broadcast_translation_progress/5, broadcast_translation_completed/3, subscribe_to_group_editors/1, and unsubscribe_from_group_editors/1. AI translation progress is delivered through the AI module’s events.
  • Public URL origins prefer the configured site URL or endpoint URL.
  • Dependencies refreshed; the core dependency floor remains 2.38.0.

Fixed

  • Language and version switches replace Leaf’s visible document and collect pending client keystrokes before saving. Preview, translation, and version creation also wait for the client buffer. An unanswered action shows a waiting indicator after 1.5 seconds and is cancelled after 6 seconds.
  • Creating a version saves the latest client text before copying the source.
  • Clean Leaf echoes no longer overwrite stored Markdown with normalized text; saved-state tracking and collaborative buffer updates follow Leaf’s protocol.
  • Public canonical redirects preserve query parameters without looping, and segment-owning dialects redirect their full-code URLs to the canonical segment. Missing translations use temporary fallback redirects, including version URLs.
  • Listing-cache installs and invalidations are serialized so stale regeneration cannot overwrite a newer snapshot or an invalidation.
  • Read-time version repair rechecks state under the relevant database guards.
  • Failed image lookups are not retained in the render cache when core 2.41.1 or newer supplies RenderCache; post cache invalidation clears UUID and slug keys. This includes the previously unpublished 0.12.1 fixes.
  • Cold test builds wait for the publishing dispatch module before expanding core’s router macro, preventing intermittent missing routes.

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