richie
richie copied to clipboard
Improve OpenGraph tags
Feature Request
We need to achieve Open Graph tags with contextual content from pages and also add a new feature to include hreflang on every page.
Is your feature request related to a problem or unsupported use case? Please describe.
From #568 we implemented basic SEO tags and especially some Open Graph tags (mostly for better experience when sharing pages in Facebook) but we faced some problem with contextual content from various pages.
It demonstrated some difficulties to get the plugin instances from content which are required to get only some content part like an image URL, opposed to the default way to get the rendered plugin content that contains some HTML which are forbidden in meta tags.
Describe the solution you'd like
It seems the only way in Richie to fill meta tags from page contents would be to create a new template tags which will be able to retrieve the plugin instances from a placeholder.
Following is a list of eligible tags to fill when the necessary way to get page content is done.
Global but optional
Think about to fill keywords meta tags. However this is not always possible for every pages and it is known that keywords is not less used from search engines, so it is a very very minor priority level. I would say it seems relevant mostly for blog posts.
Blog post
og:image: Should be filled from cover URLog:description: Should be filled from excerpt, limited to 300char and HTML stripped
Category
og:image: Should be filled from logo URLog:description: Should be filled from description, limited to 300char and HTML stripped
Course
og:image: Should be filled from cover URLog:videoShould be filled from teaser URLog:description: Should be filled from about, limited to 300char and HTML stripped
Note than course run detail may benefit also to inherit these ones from its course detail.
Organization
og:image: Should be filled from logo URLog:description: Should be filled from description, limited to 300char and HTML stripped
Person
og:image: Should be filled from portrait URLog:description: Should be filled from resume, limited to 300char and HTML stripped
Program
og:image: Should be filled from cover URLog:description: Should be filled from program_excerpt, limited to 300char and HTML stripped
Describe alternatives you've considered
The only alternative way would be to add new fields to page extension to fill contextual contents like image, video, description, keywords. But this is clearly something we don't want anymore.