Unfortunately it still does not work. Here is my config.php
<?php
/*
---------------------------------------
Kirby Configuration
---------------------------------------
By default you don't have to configure anything to
make Kirby work. For more fine-grained configuration
of the system, please check out http://getkirby.com/docs/advanced/options
*/
return [
'languages' => true,
'debug' => true,
/* Markdown Extra */
'markdown' => [
'extra' => true
],
/* Routes */
'routes' => [
[
'pattern' => 'logout',
'action' => function() {
if ($user = kirby()->user()) {
$user->logout();
}
go('login');
}
]
],
/* Meta Tags Plugin */
'pedroborges.meta-tags.default' => function ($page, $site) {
return [
'title' => $page->seoTitle()->isNotEmpty()
? $site->title() . " – " . $page->seoTitle()
: $site->title(),
'meta' => [
'description' => $page->seoDescription()->isNotEmpty()
? $page->seoDescription()
: $site->description(),
// 'tags' => $site->keywords(),
'robots' => $page->robotsIndex()->isNotEmpty() || $page->robotsFollow()->isNotEmpty()
? $page->robotsIndex()->genrobots() . ", " . $page->robotsFollow()->genrobots()
: "noindex, follow",
],
'link' => [
'canonical' => $page->url()
],
'og' => [
'title' => $page->seoTitle()->isNotEmpty()
? $page->seoTitle()
: $site->title(),
'type' => 'website',
'site_name' => $site->title(),
'url' => $page->url(),
'namespace:image' => function($page) {
$image = $page->teaserimg()->isNotEmpty()
? $page->teaserimg()->toFile()->resize(600, null)
: new Asset("assets/images/fallback.png");
return [
'image' => $image->url(),
'height' => $image->height(),
'width' => $image->width(),
'type' => $image->mime()
];
}
],
'twitter' => [
'card' => 'summary',
'site' => $site->twitter(),
'title' => $page->seoTitle()->isNotEmpty()
? $page->seoTitle()
: $site->title(),
'namespace:image' => function ($page) {
$image = $page->teaserimg()->isNotEmpty()
? $page->teaserimg()->toFile()->resize(600, null)
: new Asset("assets/images/fallback.png");
return [
'image' => $image->url(),
'alt' => $image->alt()
];
}
]
];
},
'pedroborges.meta-tags.templates' => function ($page, $site) {
return [
'artikel' => [
'title' => $page->seoTitle()->isNotEmpty()
? $page->seoTitle() . " – " . $site->title()
: $site->title(),
'meta' => [
'description' => $page->seoDescription()->isNotEmpty()
? $page->seoDescription()
: $site->description(),
// 'tags' => $site->keywords(),
'robots' => $page->robotsIndex()->isNotEmpty() || $page->robotsFollow()->isNotEmpty()
? $page->robotsIndex()->genrobots() . ", " . $page->robotsFollow()->genrobots()
: "noindex, follow",
],
'link' => [
'canonical' => $page->url()
],
'og' => [ // tags group name
'type' => 'article', // overrides the default
'namespace:article' => [
'author' => $page->author()->isNotEmpty()
? $page->author()->toUser()->name()
: 'Finaltype',
'published_time' => $page->date()->toDate('Y-m-d'),
'modified_time' => $page->modified('Y-m-d'),
// 'tag' => ['tech', 'web']
],
'namespace:image' => function($page) {
$image = $page->teaserimg()->isNotEmpty()
? $page->teaserimg()->toFile()->resize(600, null)
: new Asset("assets/images/fallback.png");
return [
'image' => $image->url(),
'height' => $image->height(),
'width' => $image->width(),
'type' => $image->mime()
];
}
],
'twitter' => [
'card' => 'summary',
'site' => $site->twitter(),
'author' => $page->author()->isNotEmpty()
? $page->author()->toUser()->twitter()
: 'Finaltype',
'title' => $page->seoTitle()->isNotEmpty()
? $page->seoTitle()
: $site->title(),
'namespace:image' => function ($page) {
$image = $page->teaserimg()->isNotEmpty()
? $page->teaserimg()->toFile()->resize(600, null)
: new Asset("assets/images/fallback.png");
return [
'image' => $image->url(),
'alt' => $image->alt()
];
}
]
]
];
},
];