PHPackages                             johannschopplich/kirby-serp-preview - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. johannschopplich/kirby-serp-preview

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

johannschopplich/kirby-serp-preview
===================================

Kirby Panel plugin for search engine result page previews

1.4.2(1mo ago)304.2k↑74.7%21MITPHP

Since Dec 10Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/johannschopplich/kirby-serp-preview)[ Packagist](https://packagist.org/packages/johannschopplich/kirby-serp-preview)[ Docs](https://github.com/johannschopplich/kirby-serp-preview#readme)[ Fund](https://kirby.tools)[ RSS](/packages/johannschopplich-kirby-serp-preview/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (27)Used By (1)

[![Kirby SERP Preview screenshot](./.github/kirby-serp-preview.png)](./.github/kirby-serp-preview.png)

Kirby SERP Preview
==================

[](#kirby-serp-preview)

See exactly how your pages will appear in Google search results – updating live as you edit, right in the Kirby Panel.

Features
--------

[](#features)

- ⚡ Live preview that updates as you type
- 🎯 Google-style search result snippet in the Panel
- 🌓 Dark and light mode – adapts to the Panel theme with Google's own colors
- 🧩 Kirby query language support in configuration
- 🗺️ Multi-language ready
- ✂️ Custom formatters for title and description
- 📊 Optional Google Search Console link

Requirements
------------

[](#requirements)

- Kirby 4 or Kirby 5

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require johannschopplich/kirby-serp-preview
```

### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby-serp-preview`.

Quick Start
-----------

[](#quick-start)

Add the section to any page blueprint:

```
sections:
  serp-preview:
    type: serp-preview
```

That's it. The preview shows:

- **Title:** page title + separator + site title
- **URL:** your site URL + page path
- **Description:** empty until configured

Configuration
-------------

[](#configuration)

### Full Example

[](#full-example)

```
sections:
  serp-preview:
    type: serp-preview
    # Site information
    siteTitle: "{{ site.title.value }}"
    siteUrl: "{{ kirby.url }}"
    faviconUrl: "{{ site.favicon.toFile.url }}"
    titleSeparator: "-"
    # Custom title (overrides default)
    titleContentKey: metaTitle
    defaultTitle: "{{ page.title.value }}"
    # Custom description
    descriptionContentKey: metaDescription
    defaultDescription: "{{ site.metaDescription.value }}"
    # Optional
    searchConsoleUrl: "https://search.google.com/search-console"
```

### Options

[](#options)

Options marked **Query** support [Kirby's query language](https://getkirby.com/docs/guide/blueprints/query-language), e.g. `{{ site.title.value }}`.

OptionDefaultQueryDescription`siteTitle``{{ site.title.value }}`YesSite name shown in the preview`siteUrl``{{ kirby.url }}`YesSite URL shown in the preview`faviconUrl`–YesURL to your favicon`titleSeparator``–`YesSeparator between page title and site title`titleContentKey`–NoField name for a custom title (e.g. `metaTitle`)`defaultTitle`–YesFallback title if `titleContentKey` is empty`descriptionContentKey`–NoField name for a custom description (e.g. `metaDescription`)`defaultDescription`–YesFallback description if `descriptionContentKey` is empty`searchConsoleUrl`–NoShows a link button to Google Search Console### Title &amp; Description Resolution

[](#title--description-resolution)

**Title** resolves in this order:

1. Value of the `titleContentKey` field, if set
2. `defaultTitle`, if configured
3. Page title + separator + site title (e.g. `About Us – My Website`)

**Description** resolves in this order:

1. Value of the `descriptionContentKey` field, if set
2. `defaultDescription`, if configured
3. No description shown

Custom Formatters
-----------------

[](#custom-formatters)

Transform the title and description before they are displayed – useful for truncating text, stripping HTML, or applying other adjustments. Formatters are defined in your configuration and receive the current value and the page object, so transformations can be page-specific:

```
// site/config/config.php
use Kirby\Toolkit\Str;

return [
    'johannschopplich.serp-preview' => [
        'formatters' => [
            'title' => function (string $value, \Kirby\Cms\Page $page) {
                // Example: limit the title length
                return Str::short($value, 60);
            },
            'description' => function (string $value, \Kirby\Cms\Page $page) {
                // Example: strip HTML and limit the length
                return Str::short(strip_tags($value), 160);
            }
        ]
    ]
];
```

License
-------

[](#license)

[MIT](./LICENSE) License © 2023-PRESENT [Johann Schopplich](https://github.com/johannschopplich)

[MIT](./LICENSE) License © 2023 [Dennis Baum](https://github.com/dennisbaum)

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance93

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Recently: every ~144 days

Total

26

Last Release

34d ago

Major Versions

0.5.1 → 1.0.02024-03-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9be5bf8dd3a36f63c00f92a115f1109567745fb3b068617341ffc8a90755d6c?d=identicon)[johannschopplich](/maintainers/johannschopplich)

---

Top Contributors

[![johannschopplich](https://avatars.githubusercontent.com/u/27850750?v=4)](https://github.com/johannschopplich "johannschopplich (137 commits)")[![grommasdietz](https://avatars.githubusercontent.com/u/136818759?v=4)](https://github.com/grommasdietz "grommasdietz (2 commits)")

---

Tags

kirby-cmskirby-pluginkirby-themekirby4kirby5googleseosearch engineSERPkirby

### Embed Badge

![Health badge](/badges/johannschopplich-kirby-serp-preview/health.svg)

```
[![Health](https://phpackages.com/badges/johannschopplich-kirby-serp-preview/health.svg)](https://phpackages.com/packages/johannschopplich-kirby-serp-preview)
```

###  Alternatives

[getkirby/cms

The Kirby core

1.5k606.6k541](/packages/getkirby-cms)[medienbaecker/kirby-modules

Easily add modules to your pages

895.6k1](/packages/medienbaecker-kirby-modules)[johannschopplich/kirby-helpers

Environment, SEO, and build utilities for Kirby CMS

318.0k](/packages/johannschopplich-kirby-helpers)[johannschopplich/kirby-seo-audit

SEO analysis powered by Yoast for Kirby CMS

102.7k](/packages/johannschopplich-kirby-seo-audit)[grommasdietz/kirby-hidden-characters

Kirby CMS plugin for visualising hidden characters in the Panel

462.2k](/packages/grommasdietz-kirby-hidden-characters)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

15134.1k](/packages/withcandour-aardvark-seo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
