Entities 0.2.6: Entity records in the sitemap without setup, in every language
Entities 0.2.6 adds entity records to the sitemap without any setup in the host app, lists them in each language they are translated into, and lets a whole entity stay out of the sitemap.
The module now tells PhoenixKit about its sitemap source itself, so an app no longer has to register it. As before, entities appear only while PhoenixKit’s sitemap_include_entities setting is on.
The sitemap used to list records only for the default language. It now runs once per enabled language and adds a localized address only when the record has a translation in that language, so it does not list pages that would 404. A record without languages whose field happens to be named like a language code, such as id or no, is no longer mistaken for a translation.
To keep an entire entity out, such as an internal or form entity whose records are published by default, set sitemap_exclude to true in the entity’s settings. Records already had the same flag.
Full release notes: Entities 0.2.6
0.2.6 · 24 June 2026
Added
- Entities sitemap source is now auto-registered with core via the
PhoenixKit.Modulesitemap_sources/0callback (PhoenixKitEntities.sitemap_sources/0returns[PhoenixKitEntities.SitemapSource]), so host apps pick it up with zero config. (#20) - Per-language sitemap output:
SitemapSource.collect/1andsub_sitemaps/1no longer short-circuit on the default language. They run once per enabled language and emit a localized URL for a record only when that record actually carries a translation for the locale, avoiding 404 entries. Gated on the coresitemap_include_entitiesadmin toggle. (#20) - Per-entity sitemap opt-out: set
entity.settings["sitemap_exclude"] = trueto keep an entire entity out of the sitemap regardless of routes orsitemap_entities_auto_pattern(mirrors the existing per-recordmetadata["sitemap_exclude"]flag). The authoritative defense for internal/form entities whose records default to status"published". (#20)
Fixed
- Sitemap per-locale translation guard no longer mistakes a flat record’s field key for a locale code. Only multilang records are locale-keyed; a flat record’s
datais keyed by field names, so a field named like a base locale (e.g."id"→ Indonesian,"no"→ Norwegian) was falsely counted as a translation and emitted a localized URL that 404s.record_has_translation?/2now gates onMultilang.multilang_data?/1. (#20 follow-up)
Changed
- Dependency lockfile bumps:
phoenix_kit1.7.133 → 1.7.165,phoenix1.8.7 → 1.8.8,phoenix_live_view1.1.31 → 1.2.3,plug1.19.2 → 1.20.1,req0.6.1 → 0.6.2,finch0.22.0 → 0.23.0,igniter0.8.1 → 0.8.2,sourceror1.12.0 → 1.12.2,tessera0.2.1 → 0.3.1,leaf0.2.21 → 0.3.0 (now backed bymdexinstead ofearmark). Removed the resulting orphaned top-levelearmarklock entry.
Entities 0.2.6. Install or update: {:phoenix_kit_entities, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.