seo: add json-ld structured data for videos.

Makes video posts eligible for rich results in Google, which means they
can include a thumbnail.

Ref: https://developers.google.com/search/docs/data-types/video
This commit is contained in:
evazion
2020-07-08 15:16:58 -05:00
parent df32e0da72
commit fc331f2079
2 changed files with 17 additions and 0 deletions

View File

@@ -147,6 +147,10 @@
<% if policy(@post).visible? %>
<%= tag.meta property: "og:image", content: @post.open_graph_image_url %>
<% if @post.is_video? %>
<%= json_ld_video_data(@post) %>
<% end %>
<% end %>
<% if @post.twitter_card_supported? %>