diesdasdigital / kirby-meta-knight

🔍 Meta Knight – SEO & Social Media Sharing Plugin for Kirby.
MIT License
109 stars 18 forks source link

Using page->text() as fallback meta #16

Open AhoyLemon opened 3 years ago

AhoyLemon commented 3 years ago

This is something I mentioned in Issue #14, and I ended up adding these changes to my own site. I'm putting it in as a PR just in case you think it would help you as well.

So basically, what this does in a nutshell is add an excerpt of page->text()->excerpt(180) as a fallback between manually enterered meta info and the sitewide meta info.

So, for example, OpenGraph looks like...

  1. OpenGraph Description
  2. Meta Description
  3. Excerpt of Page Text
  4. Sitewide Meta Description
  5. blank/error message

If this is unhelpful or not what you were thinking for this plugin, do please ignore. Just providing what I did in case it helps others.