Entities 0.2.7: Entity sitemap settings editable in the Sitemap admin
Entities 0.2.7 describes its three global sitemap settings to PhoenixKit, so the Sitemap admin can show editors for them instead of leaving them to the console.
The settings are Include entity index pages (on by default), Auto-generate URLs for unrouted entities (off by default) and Global URL pattern (blank by default). The admin shows them on PhoenixKit releases whose Sitemap screen can draw such settings; on older ones nothing changes. Per-entity URL patterns stay console-only.
A blank global pattern now counts as not set. Before, saving it blank from the admin would have pointed every eligible record’s sitemap address at the site root.
The documentation had said auto-generated URLs were on by default. They are off, and the help text now warns that turning them on makes every published entity eligible for the sitemap, internal and form entities included, unless the entity is excluded.
Full release notes: Entities 0.2.7
0.2.7 · 6 July 2026
Added
PhoenixKitEntities.SitemapSource.sitemap_settings_schema/0— optionalSourcebehaviour callback that declares the entities source’s fixed global sitemap settings (sitemap_entities_include_index,sitemap_entities_auto_pattern,sitemap_entities_pattern) so the core Sitemap admin screen can render editors for them instead of requiring console/PhoenixKit.Settingsedits. Per-entity, name-keyed overrides (sitemap_entity_{name}_pattern,sitemap_entity_{name}_index_path) stay console-only by design. Core gates the call behindfunction_exported?/3, so it is inert on phoenix_kit releases that predate the schema-rendering UI. (#21)
Fixed
sitemap_settings_schema/0is now annotated@impl true. The pinnedphoenix_kit(1.7.x) declares it as an optionalSourcecallback, so the missing annotation tripped the compiler’s@implconsistency check and brokemix compile --warnings-as-errors(i.e.mix precommit). (#21 follow-up)UrlResolver.get_global_pattern/1now treats a blanksitemap_entities_patternas unset, mirroring the per-entitysitemap_url_patternguard. The new settings schema declares""as this setting’s default, so a blank admin value can be persisted; without the guard an empty global pattern resolved to""and collapsed every eligible entity record URL to the site root. (#21 follow-up)
Changed
- Corrected the
SitemapSourcemoduledoc:sitemap_entities_auto_patterndefaults tofalse(it was documented as enabled-by-default, contradicting the code and the new schema). The wrong default is security-relevant — auto-pattern makes every published entity, including internal/form entities, sitemap-eligible via the/:entity_name/:slugfallback. Also removed a customer-specific domain from the admin help text. (#21 follow-up) - Dependency lockfile bumps:
phoenix_kit1.7.165 → 1.7.175,phoenix_live_view1.2.3 → 1.2.5,plug1.20.1 → 1.20.2,swoosh1.26.1 → 1.26.3,etcher0.6.6 → 0.7.1,mdex0.13.1 → 0.13.3,mdex_native0.2.2 → 0.2.4,mint1.9.0 → 1.9.1,db_connection2.10.1 → 2.10.2,hpax1.0.3 → 1.0.4,makeup1.2.1 → 1.2.2,ex_ast0.12.0 → 0.12.7.
Entities 0.2.7. Install or update: {:phoenix_kit_entities, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.