vaersaagod / seomate

SEO, mate! It's important. That's why SEOMate provides the tools you need to craft all the meta tags, sitemaps and JSON-LD microdata you need - in one highly configurable, open and friendly package - with a super-light footprint.
MIT License
36 stars 8 forks source link

trimming 'description' text — an idiots guide?! #81

Closed MattAppleton closed 10 months ago

MattAppleton commented 11 months ago

Hello — fantastic plugin, which is doing everything I want so far, bar one thing...

I'd like the 'description' text to fall back to my 'mainContent' field if it isn't set. Which works fine, but... often this is a very long text! How do I trim this?

I found your documentation about how to set the parameters, in my case I have:

'description,og:description,twitter:description, mainContent' => [
        'type' => 'text',
        'minLength' => 50,
        'maxLength' => 300
    ],

but if I place this in my seomate.php file, it doesn't do anything, perhaps I need a custom meta template? Just not sure how / where to make this?

Any help much appreciated!

aelvan commented 10 months ago

You also need to set applyRestrictions to true for those to take effect.