Skip to content

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.txt and llms.txt stay 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 key crawlers). 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.txt is host policy and Plug.Static answers 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.txt and llms.txt must 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 a KeyError behind 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, static phoenix_kit_themes.js). Pre-paint ThemeBootstrap stamps the saved choice — and now ships the palettes next to the stamp — so a dark-OS visitor is not painted color-scheme: dark over light variables. Picker modes :auto | :dropdown | :toggle; a light/dark pair renders one persistent aria-pressed toggle (#716).

  • PhoenixKit.Utils.Pagination — parse_page/1 and total_pages/2 (floored at 1). The unfloored ceil copies fed 1..0 decreasing ranges on empty lists (#716).

  • <button variant="error"> (and info/success/warning). Status colours are first-class variants; appending btn-error through class collided 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 granted seo gain crawlers. The old seo permission rows are kept deliberately: the repair manifest still lists the V135 seo seed, so deleting them would set mix phoenix_kit.repair and this migration fighting over the same row. A deprecated PhoenixKit.Modules.SEO shim keeps host callers compiling, and frees the seo module key for the external phoenix_kit_seo package (#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 give phoenix_kit_ecommerce a real unique_constraint to name — a collision comes back as a changeset error on :slug instead of a raw Postgrex.Error (#714).

  • Scheduled jobs are claimed before they run. The plain SELECT let 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 new processing status and only the winner executes; a sweep that dies holds its claim until a reclaim window returns the row to pending (or to failed once 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 from Application.spec/2, and fails when a pin appears for a repo it does not cover (#715).

  • Admin theme picker honours :dashboard_themes. Hardcoding :all meant a host’s narrowed list governed only the user dashboard (#716).

  • Removed unused ThemeConfig helpers (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_tabs entries whose path carries :param or *splat segments are routes, not nav — they rendered a literal :uuid in the sidebar unless every host remembered visible: false. Detection is per-segment, so https://, ports, and mailto: are unaffected; visible: true is the opt-out. Nil-scope callers no longer receive visible: false tabs 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 own handle_info. Any view without a clause for it (most of them) died in FunctionClauseError the 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’s SELECT DISTINCT — to one projection row, so it is not a collision. Counting entries made it one: an active row in that shape aborted the upgrade with shared by 2 live rows, naming a second row the operator would never find, and a non-live one had a spelling silently rewritten to hat-2, giving the row two public URLs where it had one. Both loops now count DISTINCT uuid, and a row that does lose a bucket moves all its spellings to the one candidate (post-merge review of #714).

  • V172.down/1 deleted every crawlers permission grant, though its comment promised only the copies up/1 made. After the upgrade crawlers is a first-class key in the admin matrix, so a rollback discarded grants an operator had added to roles that never held seo — and re-running up/1 could not restore them. The delete is now qualified by a surviving seo grant 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_verifications was assigned on every LiveView navigation and read by nothing. CrawlerMetas reads 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_index stays as the published signal for host templates (post-merge review of #714).

  • crawlers_no_index?/0 in the sitemap generator guarded rescue but not catch :exit. An unreachable database raises on an unowned checkout but exits on a dead pool (post-merge review of #714).

  • Host :theme_definitions never appeared in the default picker. dropdown_themes(:all) was the compile-time catalogue only, so a branded theme landed in CSS / labels / system_pair and not in the picker until the host also listed it in :dashboard_themes (post-merge review of #716).

  • ThemeBootstrap stamped phoenix-dark without shipping the palettes. Standalone admin and every host layout the installer injects into painted color-scheme: dark over 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 in JS.dispatch detail. phx.new 1.8’s script reads dataset.phxTheme and 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.update skipped the bootstrap on every phx.new 1.8 host. Any phx:theme substring was treated as “already done”; that script’s "system" path removes data-theme. Those layouts now get the bootstrap just before </head>, after the stock script (post-merge review of #716).

  • Pagination extract missed media_selector.ex and Auth.list_users_paginated/1. Same unfloored empty-list 1..0 range the helper exists to stop (post-merge review of #716).

  • Referral 0.4 backfill used function_exported?/3 without Code.ensure_loaded?/1. Under a release the new signup_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.