Kirby SEO - Serp preview field for the panel


Wow! Great work @jenstornell :ok_hand:


Kirby SEO 0.5 released

The only thing that is new in this version is that the fields are now registered with the plugin.

Require Kirby 2.3 beta 2


Hi, the plugin looks pretty good, but i can’t figure out how to install it, seems like you have missed an obvious and really important installation step in your doc, for the beginers its really important, because you only tell to install the fields but i dont know what to do with all the others folder in your plugin. I dont even see the folder “plugins/seo” that must be installed in “site/plugins” as you said in your original post.

Can you help me on that? Kirby tells me “seo plugin required”


Ok so, i found what to do first, and it really should be added to the docs for beginners,/casuals, drop the downloaded folder into site/plugins and rename it “seo”


Other issue, title fallback works fine but not description fallback.


I’m on vacation for 3 weeks but If you use Github you can add an issue there. Thanks!


the plugin is not responsive for mobile panel access.

it’ll break the width creating horizontal scrolling.

( the url field if the url is long…)


I know. I added an issue:

I can not say when it’s fixed.


I’ve removed the url entry in the viewing, since the url can be changed and viewed by vanilla panel option anyhow.


On one Server Configuration I’ve got an issue with this plugin

Giving error Message just on the home Page saying:

Undefined index: path

  $uri = $scheme . $url_parts['host'] . $url_parts['path'];

the line above from the code below is the problem i guess… that’s what the new kirby debugger is telling me.

  public static function uri($url) {
  $url_parts = parse_url($url);
  $uri = substr( $url_parts['path'], 1 );
  return $uri;

// Url preview
public static function urlPreview( $url ) {
  $url_parts = parse_url($url);
  $scheme = ( $url_parts['scheme'] == 'https' ) ? 'https://' : '';
  $uri = $scheme . $url_parts['host'] . $url_parts['path'];
  return $uri;

// Edit slug url
public static function editSlugUrl($page) {
  $url = u() . '/panel/pages/' . $page->id() . '/url';
  return $url;

// Inside panel, get texts
public static function texts( $page, $field = null ) {

The Field inside the Panel also Errors out on the Homepage only… I guess it has something to do if the path is empty??


I added an issue about it:

I think there is room for improvements of the paths in general. I’ve learned a few things since then and Kirby has evolved as well.

Thanks for the report!


my fix is to exclude the seo('title) and seo(‘description’) from the header snippet for home-page. obviously panel still shows me the error for that field.

not very elegant i know…


It seems like you are a king of dirty hacks. :wink:

I always work with what is in line with what I’m working with and therefor this plugin has not have that much love from me recently.


Instead you can check if the path index is set:

isset($url_parts['path'])?  $uri = $scheme . $url_parts['host'] . $url_parts['path']:$uri = $scheme . $url_parts['host'];


that solved it… your code lacks a ‘)’ though…

        isset($url_parts['path'])?  $uri = $scheme . $url_parts['host'] . $url_parts['path']:$uri = $scheme . $url_parts['host'];

just found the languages folder and did a sloppy translation… i wonder for “fallback” there are many words i wouldn’t actually use…

l::set( array(
    'seo.title' => 'SEO Titel',
    'seo.description' => 'SEO Beschreibung',
    'fallback' => 'Ersatzwert',
    'values' => 'Werte',
    'plugin.required' => 'SEO plugin wird benötigt!',
    'description.fallback' => 'Dies ist der meta description tag (Meta Beschreibung). Wenn dieser zum Seiteninhalt passt, wird die Suchmaschine diesen im Suchergebnis anzeigen. Falls dieser nicht relevant ist, zeigt die Suchmaschine stattdessen einen Teil des Textes aus dem Seiteninhalt.'


Sorry, this almost ALWAYS happens to me when I post code here… I think I need an automatic alarm :alarm_clock:


no problems sonja, still doing a good job!


I this context I’d probably use “Standardwert”, “Ersatzwert” sounds a bit strange.


new issues arise with php 7.1.x
commenting most of it out does not help long term…


$htmlis defined as empty string, but then used as array.

Try this:

$html = array();