@texnixe Yup its mine
@John2202 At the very least, you need to create a controller for each page template, and drop the following into it:
<?php
return function ($page, $kirby, $site) {
// SEO
$seo = $kirby->controller('seo' , compact('page', 'site', 'kirby'));
return $seo;
};
Then snippet will work (you should put the snippet inside the head tag). If you can give me more detail about the error you are getting, I will do my best to help you.
For inner pages, you probably want to customise things like the page title. You can do that by overiding the variables in the controller for that template:
<?php
return function ($page, $kirby, $site) {
// Meta
$seo = $kirby->controller('seo' , compact('page', 'site', 'kirby'));
// Override Meta Title
$metatitle = $page->seotitle().' | '.$site->title();
$data = compact('metatitle');
return a::merge($seo, $data);
};
Lastly, add the Blueprint to you own blueprints. The one in the plugin is meant to be used as a tab.
Here is a complete list of the things you overide in the controllers, along with the default values for reference:
// Meta
'metatitle' => $site->title(),
'metadesc' => $page->seometa(),
'metakeywords' => $page->seotags(),
'metarobots' => 'index, follow, noodp',
'metaurl' => $site->url(),
'metaimage' => $page->shareimage()->toFile() ? $page->shareimage()->toFile()->crop(1280, 720)->url() : ' ',
// Facebook Meta
'metafbtype' => 'website',
'metafbsitename' => $site->title(),
'metafblocale' => 'en_GB',
// Twitter Meta
'metatwcard' => 'summary_large_image',
'metatwsite' => $site->socialtwitterurl()->isNotEmpty() ? $site->socialtwitterurl() : ' ',
'metatwcreator' => $site->twittercreator()->isNotEmpty() ? $site->twittercreator() : ' ',