tobimori / kirby-seo

🔎 All-in-one toolkit that makes implementing SEO & Meta best practices in your Kirby 4+ site a breeze
https://plugins.andkindness.com/seo
MIT License
85 stars 13 forks source link

metaDescription - dynamic from field #110

Closed Messa1 closed 1 month ago

Messa1 commented 1 month ago

It's more of a question than a bug.

When I use code like this - Will I see the tags in the preview of your plugin? Or am I just changing the output of the SEO field?

<?php
// site/models/template.php

use Kirby\Cms\Page;

class TemplatePage extends Page
{
    public function metaDefaults(string $lang = null): array
    {
        $content = $this->content($lang);

        return [
            'metaDescription' => $this->categories() . ' ' . $content->summary(),
        ];
    }
}
tobimori commented 1 month ago

It should be visible in the Google preview but not as placeholder in the field