Kirby SEO 2 🚀
The first stable release for Kirby 5 includes a site-wide SEO overview, AI Assist, an alt text field, Google Search Console, IndexNow and LLM-friendly content. It's a natural upgrade from 1.x: your content and blueprints keep working.
Kirby SEO 2 requires Kirby 5 and PHP 8.3. A license is required for public sites: buy a license. Read the upgrade guide before updating from 1.x.
composer require tobimori/kirby-seo🎉 Features
SEO overview
We've added a new SEO area to the Panel. It checks titles, descriptions, alt texts and links across the whole site, and each card takes you to the pages, images or links that need work.
- Checks for missing, duplicate, too short and too long titles and descriptions, and values inherited from a fallback
- You can now edit meta titles and descriptions for multiple pages in the table or generate them with AI
- You can now edit alt texts for multiple images at once
- You can now check internal and external links for broken targets. With Kirby Queues, the checks run in the background on a schedule.
AI Assist
AI Assist writes meta titles and descriptions based on the page content. It uses the page's language, takes the length of your title template into account and includes unsaved changes. Editors can generate new text or revise the current one.
OpenAI, Anthropic, Google Gemini and OpenRouter are supported out of the box. You can also add your own providers and replace the built-in prompts with your own snippets.
// site/config/config.php
return [
'tobimori.seo' => [
'ai' => [
'provider' => 'anthropic',
'providers' => [
'anthropic' => [
'config' => [
'apiKey' => 'sk-ant-...',
],
],
],
],
],
];Alt text field
The new alt-text field generates alt texts with AI based on the image itself and has a toggle for decorative images. With autogenerate: true, alt texts are generated on upload. On multilingual sites, a single request covers all languages.
# site/blueprints/files/image.yml
fields:
alt:
type: alt-text
autogenerate: trueGoogle Search Console
The new Google Search Console section shows clicks, impressions, click-through rate, position and top search queries for each page, right next to its content. Editors don't need their own Google account.
LLM-friendly content
Kirby SEO can now serve Markdown versions of your pages for AI agents, as well as an llms.txt file for each language. The Markdown comes from a .md.php representation next to the template or from an automatic conversion of the page's main content.
<?php // site/templates/article.md.php ?>
# <?= $page->title() ?>
<?= $page->text()->value() ?>Agents can open /article.md or request Markdown with the Accept: text/markdown header. Markdown responses send noindex and a link to the original page so search engines don't list them as duplicates.
IndexNow
Kirby SEO now notifies Bing, Yandex and other search engines via IndexNow when pages change. With rules, you can submit related pages as well, such as the parent of a new blog post.
'tobimori.seo' => [
'indexnow' => [
'rules' => [
'article' => ['parent' => true, 'urls' => ['/blog', '/']],
],
],
],Title templates with variables
Title template fields now show Page Title and Site Title as buttons and chips instead of raw query syntax. Title, description and template fields use the new seo-writer field with AI buttons.
UTM share
We've added a dialog to the page view to create campaign links with UTM parameters and copy them with a click.
Background processing
With Kirby Queues installed, AI alt text generation, IndexNow submissions and link checks run in a queue worker instead of during the Panel request.
Opt out of AI training
You can now opt out of AI training with the new ai and imageai robots types. They output noai and noimageai, and editors can allow AI training again for individual pages or the whole site.
'tobimori.seo' => [
'robots' => [
'types' => ['index', 'follow', 'archive', 'imageindex', 'snippet', 'ai', 'imageai'],
],
],Optimized head order
You can now use seo/head with slots to output the <title> before your stylesheets and scripts, and the other meta tags after them (#112).
<?php snippet('seo/head', slots: true) ?>
<link rel="stylesheet" href="/assets/css/main.css">
<?php endsnippet() ?>Kirby Agents
The SEO writer and alt text fields now support Kirby Agents, so agents can read and edit metadata and alt texts.
And more …
- New license activation in the Panel
- Panel previews respect dark mode and use the current Google design
- New
canonical.trailingSlashoption (#136) - Mastodon profile links are output as
<link rel="me">(#92) - New
componentsoption to replace built-in classes
✨ Enhancements
- The sitemap lists each translation of a page as its own entry, with the same
hreflangalternates on every entry hreflangtags only list existing, indexable translations- Pages with a non-canonical URL, for example with query parameters, do not output
hreflangtags (#98) x-defaultpoints to the page's language-neutral URL (#177), with the default language's slug (#146)- The sitemap stylesheet shows language alternates and a cleaner table
- IndexNow skips pages with
noindex - Panel previews use the page's canonical URL (#185, thanks @antons)
⚡ Performance
- Kirby SEO caches indexable pages and page, image and link check results. This speeds up the SEO overview and sitemap on large sites.
- The sitemap index and
llms.txtuse the pages cache
🐛 Bug fixes
og:image:widthandog:image:heightuse the cropped image's dimensions (#91)- The sitemap URL in
robots.txtis correct on multilingual sites (#124) - The sitemap uses the canonical base URL, and its stylesheet loads on sites in a subfolder (#88)
- The sitemap returns content for
HEADrequests. This fixes "Sitemap could not be read" errors in Google Search Console (#164, thanks @tomsl123).
🚨 Breaking changes
The upgrade guide covers the steps for updating.
- Kirby SEO 2 requires Kirby 5 and PHP 8.3
- A license is required for public sites. Kirby SEO 1.x remains available under the MIT license.
lang,sitemap.langanddefault.langare nowlocale,sitemap.localeanddefault.locale. The old names are ignored.- The
spatie/schema-orgpackage is no longer installed with Kirby SEO (#48). Installspatie/schema-org:^5.0(PHP 8.4) if you output Schema.org data. - Twitter options, fields and
twitter:*tags are removed. X reads the Open Graph tags. - A page's meta description now takes priority over the site's Open Graph description for
og:description. ThefallbackFieldscascade level is enabled by default. - Title templates only resolve
{{ title }}and{{ site.title }}, because editors can change them in the Panel. To use all Kirby queries as in 1.x, set the newkqloption totrue. Only enable it if you trust all Panel users. $page->metadata()and$page->robots()take aKirby\Cms\Languageobject instead of a language codeSitemapUrl::lastmod()takes a Unix timestamp instead of a date string
☠️ Deprecated
canonicalBase→ usecanonical.baserobots.active→ userobots.enabledsitemap.active→ usesitemap.enabled
🌐 Translations
- Czech (thanks @jan-herman)
- Dutch (thanks @wietseneven)
- Romanian (thanks @danburzo)
- Swedish (thanks @olach)
📚 Docs
The new documentation includes a quickstart, a page for each feature, customization guides, an options reference and an upgrade guide.
🧹 Housekeeping
- Static analysis with Mago for all PHP code
- Updated dependencies
Thanks to everyone who tested the alphas, betas and release candidates, reported issues and sent pull requests: @olach, @wietseneven, @jan-herman, @ovenum, @lukasleitsch, @danburzo, @tomsl123, @FloWinge, @antons, @notz and @FlorianBoe.
Full Changelog: 1.1.2...2.0.0



