PhoenixKit 2.6.0: The SEO module becomes Crawlers
PhoenixKit 2.6.0 renames the built-in SEO module to Crawlers and makes it the page where a site decides which bots may read it. It also stops scheduled jobs from running twice and fixes a crash on admin pages during maintenance broadcasts.
Crawlers
The settings live at /admin/settings/crawlers, under the new crawlers permission; the old /admin/settings/seo address is gone. Under Who may crawl this site, each group of bots can be allowed or blocked: search engines, AI training scrapers, AI assistants and AI search, SEO tool crawlers and web archives. All are allowed by default, so turning the module on changes nothing until you decide otherwise.
- robots.txt: the page builds the complete file your choices describe, with a Copy button. PhoenixKit does not serve it; you put it in your app, since the app’s static files answer before the router.
- llms.txt is served at the site root and under the PhoenixKit prefix while the module is on. Its heading is the project title and its body is text you write on the page.
- Search engine verification takes the Google and Bing verification codes. You can paste the whole
<meta>tag; the code is taken from it. - Block at the application, off by default, answers 403 to requests whose user agent belongs to a blocked group, for bots that ignore robots.txt.
robots.txtandllms.txtstay reachable. - The noindex switch stays, as Noindex · Nofollow.
The noindex and verification tags now come from a component that reads its own settings, <PhoenixKitWeb.Components.Core.CrawlerMetas.crawler_metas />. Most sites render the page head in their own root layout, where the old noindex tag never arrived, so add that line to your layout’s <head>. mix phoenix_kit.doctor gets a Crawler Visibility check that warns when noindex is on for a host that looks like production, or off for one that looks like staging.
Shop slugs
Migration V171 changes how shop product and category slugs are kept unique: per base language and value, matching the addresses the shop serves. Before, only one language was checked, while hat in English and hat in German counted as a clash though they never share a URL. A clash now comes back as a form error on the slug instead of a database error.
Fixes
- Scheduled jobs are claimed before they run, so two overlapping runs, or two servers, can no longer both run the same job.
- A maintenance mode broadcast crashed most admin pages an admin had open. They now ignore it.
- The scripts PhoenixKit loads from a CDN, such as the Etcher annotation editor, now match the versions in the lock file. Etcher had fallen three minor versions behind.
Upgrading
Run mix phoenix_kit.update for migrations V171 and V172. V172 renames the settings from seo_* to crawlers_*, keeping the values your site uses, and gives every role with the seo permission the new crawlers permission. Code calling PhoenixKit.Modules.SEO still compiles but is deprecated. V171 renames clashing slugs of products or categories that are not live with -2, -3 and so on, but stops and names the value when two live ones clash, so the choice of which one keeps its URL is yours. Then add the crawler_metas line to your root layout.
Full release notes: PhoenixKit 2.6.0
2.6.0 · 14 August 2026
The built-in SEO module becomes Crawlers and grows into the one page where an operator decides who may read the site; the theme system becomes one generated controller plus a pre-paint bootstrap that hosts can brand from config; shop slugs get a uniqueness bucket that matches the URL the resolver actually serves; scheduled jobs stop double-firing; and every vendored CDN pin is now held to its lock. Chain moves V170 → V172 (#714, #715, #716).
Added
-
Crawlers module (
PhoenixKit.Modules.Crawlers, settings at/admin/settings/crawlers, permission keycrawlers). Per-bot-group access toggles over a curated registry — search engines, AI training scrapers, AI assistants, SEO tool crawlers, web archives — all default-allowed, so enabling the module changes nothing until the operator decides otherwise (#714). -
Generated
robots.txt. The settings page renders the complete file the toggles describe, for copy-paste. Core still deliberately does not serve it:robots.txtis host policy andPlug.Staticanswers before the router (#714). -
llms.txt, served at the site root and under the kit prefix (same reasoning as/sitemap.xml), 404ing while the module is disabled. Heading from the project title, body from an operator-edited setting (#714). -
Search-engine verification metas (
google-site-verification,msvalidate.01). Pasting a whole<meta>tag extracts the content value (#714). -
PhoenixKitWeb.Components.Core.CrawlerMetas— a head component that reads its own settings, so it renders in ANY root layout. Most installs render the head in the host app’s root layout, where core’s assigns never arrive, and the previous assign-based noindex meta silently reached no page on those installs. Core’s two shells use it; hosts embed one line (#714). -
PhoenixKitWeb.Plugs.CrawlerBlocker— default-off, honestly advisory 403 for user-agents of blocked groups, wired into the kit page pipeline. Policy-file scopes skip it on purpose:robots.txtandllms.txtmust stay fetchable by the bots they are about (#714). -
Doctor check “Crawler Visibility” — warns on noindex left ON for a production-looking host, and on a staging-looking host left indexable (#714).
-
PhoenixKit.Conformance.ComponentAssigns— a static check that a HEEx function component never reads an assign it neither declares nor assigns itself. The compiler validates call sites, never callee bodies, which let aKeyErrorbehind an:if={...}guard ship for four releases (#714). -
Host-branded themes from config (
:theme_definitions). Override a built-in palette or define a named theme (:label,:base, optional:extends/:variables); one validation pass feeds both the CSS and the JS embeds. Injection-hardened at both sinks (#716). -
One theme controller script (
ThemeControllerScript) replaces the three drifted copies (dashboard inline, admin inline, staticphoenix_kit_themes.js). Pre-paintThemeBootstrapstamps the saved choice — and now ships the palettes next to the stamp — so a dark-OS visitor is not paintedcolor-scheme: darkover light variables. Picker modes:auto | :dropdown | :toggle; a light/dark pair renders one persistentaria-pressedtoggle (#716). -
PhoenixKit.Utils.Pagination—parse_page/1andtotal_pages/2(floored at 1). The unflooredceilcopies fed1..0decreasing ranges on empty lists (#716). -
<button variant="error">(and info/success/warning). Status colours are first-class variants; appendingbtn-errorthroughclasscollided with the variant’s own colour and stylesheet order decided who won (#716).
Changed
-
V172 renames the SEO module to Crawlers. Settings rows (
seo_module_enabled/seo_no_index→crawlers_*) are renamed with a dedupe guard where the old row’s value wins — it is what the running site was honouring — and roles grantedseogaincrawlers. The oldseopermission rows are kept deliberately: the repair manifest still lists the V135seoseed, so deleting them would setmix phoenix_kit.repairand this migration fighting over the same row. A deprecatedPhoenixKit.Modules.SEOshim keeps host callers compiling, and frees theseomodule key for the externalphoenix_kit_seopackage (#714). -
V171 gives shop slugs a uniqueness bucket of (base language, value). The V52-era expression index on the alphabetically-first key’s value under- and over-enforced at once: other languages were unconstrained, so collisions surfaced far from the save that caused them, while
{"en":"hat"}and{"de":"hat"}collided though they can never shadow each other in a URL. Trigger-maintained projection tables now enforce the bucket the resolver reads, and their pkeys givephoenix_kit_ecommercea realunique_constraintto name — a collision comes back as a changeset error on:sluginstead of a rawPostgrex.Error(#714). -
Scheduled jobs are claimed before they run. The plain
SELECTlet two overlapping sweeps — core’s cron worker and a host calling the public function, or two nodes — both see the same rows and both fire the handler, which host handlers are not required to survive. A row is now claimed with a CAS into a newprocessingstatus and only the winner executes; a sweep that dies holds its claim until a reclaim window returns the row topending(or tofailedonce attempts are spent). Both terminal marks are CAS’d, so a late mark from a slow sweep cannot stomp a row that has already been requeued (#714). -
Every vendored CDN pin is held to the version the lock resolves. #709 fixed leaf’s pin and pinned it with a leaf-only test; the three sibling pins in the same file had all drifted — etcher by three minors, so none of the 0.12.0 tldraw-parity work reached any host. The test is generalized to every
gh/pin, resolves the expected version fromApplication.spec/2, and fails when a pin appears for a repo it does not cover (#715). -
Admin theme picker honours
:dashboard_themes. Hardcoding:allmeant a host’s narrowed list governed only the user dashboard (#716). -
Removed unused
ThemeConfighelpers (get_theme/0,theme_data_attributes/0,modern_css_variables/0, the slider maps). They had no remaining in-repo callers; a host still calling them will not compile (#716). -
Route-pattern tabs hide themselves from navigation.
admin_dashboard_tabsentries whose path carries:paramor*splatsegments are routes, not nav — they rendered a literal:uuidin the sidebar unless every host rememberedvisible: false. Detection is per-segment, sohttps://, ports, andmailto:are unaffected;visible: trueis the opt-out. Nil-scope callers no longer receivevisible: falsetabs unfiltered (#716).
Fixed
-
A maintenance broadcast killed admins’ LiveViews. The on_mount hook returned
{:cont, ...}for an admin — maintenance never blocks them, so there was nothing left to do — which handed{:maintenance_status_changed, _}to the LiveView’s ownhandle_info. Any view without a clause for it (most of them) died inFunctionClauseErrorthe moment a toggle broadcast, or the hook’s own end-of-window timer, fired while an admin had the page open (#714). -
V171’s dedup counted slug entries instead of owner rows. A single row carrying two spellings of one language at the same value (
{"en":"hat","en-GB":"hat"}) projects — via the trigger’sSELECT DISTINCT— to one projection row, so it is not a collision. Counting entries made it one: anactiverow in that shape aborted the upgrade withshared by 2 live rows, naming a second row the operator would never find, and a non-live one had a spelling silently rewritten tohat-2, giving the row two public URLs where it had one. Both loops now countDISTINCT uuid, and a row that does lose a bucket moves all its spellings to the one candidate (post-merge review of #714). -
V172.down/1deleted everycrawlerspermission grant, though its comment promised only the copiesup/1made. After the upgradecrawlersis a first-class key in the admin matrix, so a rollback discarded grants an operator had added to roles that never heldseo— and re-runningup/1could not restore them. The delete is now qualified by a survivingseogrant for the same role (post-merge review of #714). -
Empty Crawlers string settings failed their first write. The three optional slots (Google/Bing verification, llms.txt extra) were not in
@optional_settings, so the first write of an empty value — with no row yet — failed validation and a form saving both slots half-applied: the non-empty one landed, the empty one errored, and the flash reported failure (#714). -
Three doc sites named V170 as the rename migration; it is V172. V170 is a real, unrelated migration, so the stale numbers from an in-flight renumber pointed anyone debugging a half-renamed settings table at the wrong file (post-merge review of #714).
-
:crawlers_verificationswas assigned on every LiveView navigation and read by nothing.CrawlerMetasreads its own settings, which is the whole point of it; the assign-based path it replaced was kept and extended, costing two unguarded settings reads per navigation for a value with no reader. Removed;:crawlers_no_indexstays as the published signal for host templates (post-merge review of #714). -
crawlers_no_index?/0in the sitemap generator guardedrescuebut notcatch :exit. An unreachable database raises on an unowned checkout but exits on a dead pool (post-merge review of #714). -
Host
:theme_definitionsnever appeared in the default picker.dropdown_themes(:all)was the compile-time catalogue only, so a branded theme landed in CSS / labels /system_pairand not in the picker until the host also listed it in:dashboard_themes(post-merge review of #716). -
ThemeBootstrap stamped
phoenix-darkwithout shipping the palettes. Standalone admin and every host layout the installer injects into paintedcolor-scheme: darkover daisyUI’s light variables until a later body<style>arrived. The custom-theme CSS now travels with the stamp (post-merge review of #716). -
Dropdown options had no
data-phx-theme. The toggle used the stock Phoenix contract; the options put the name only inJS.dispatchdetail. phx.new 1.8’s script readsdataset.phxThemeand falls back to"system", so every dropdown click reset the theme on a host that kept that script (post-merge review of #716). -
mix phoenix_kit.updateskipped the bootstrap on every phx.new 1.8 host. Anyphx:themesubstring was treated as “already done”; that script’s"system"path removesdata-theme. Those layouts now get the bootstrap just before</head>, after the stock script (post-merge review of #716). -
Pagination extract missed
media_selector.exandAuth.list_users_paginated/1. Same unfloored empty-list1..0range the helper exists to stop (post-merge review of #716). -
Referral 0.4 backfill used
function_exported?/3withoutCode.ensure_loaded?/1. Under a release the newsignup_use_exists?looked missing and the users the feature exists to admit stayed parked (post-merge review of #716). -
Accounts that redeemed a code before the satisfied-stamp existed were parked at the referral wall. The gate now asks the installed module and stamps on a hit, so each account pays the query at most once (#716).
PhoenixKit 2.6.0. Install or update: {:phoenix_kit, "~> 2.6"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.