bridgetownrb / bridgetown-seo-tag

A Bridgetown plugin to add metadata tags for search engines and social networks to better index and display your site's content.
MIT License
29 stars 8 forks source link

og:type detection appears to be incorrect #6

Open olbrich opened 1 year ago

olbrich commented 1 year ago

https://github.com/bridgetownrb/bridgetown-seo-tag/blob/686c43c075c077845162ed0be1019da60775ce00/lib/template.html#L43-L48

When implementing this plugin using Bridgetown 1.1, this template always detects the page as an article. This appears to happen because all pages have a date property. As of the latest release of this plugin (5.0), it's not possible to properly set the og:type for pages that aren't articles.

I would expect this value to be set by the page front matter.. perhaps something like seo.type. This would also make it easy to set up defaults for particular page types using front-matter defaults.