about summary refs log tree commit diff
path: root/app/views/stream_entries/show.html.haml
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-12 05:39:38 +0200
committerGitHub <noreply@github.com>2017-09-12 05:39:38 +0200
commit8f8e6776306b07d5914ef39c895de0cab44ada7f (patch)
treed6871435a0790985bc3afd8cb00c0469d22bf229 /app/views/stream_entries/show.html.haml
parent4931eac28003aed8a35ce6c7c499840c92cc3af5 (diff)
Clean up and improve generated OpenGraph tags (#4901)
- Return all images as og:image
- Return videos as og:image (preview) and og:video
- Return profile:username on profiles
Diffstat (limited to 'app/views/stream_entries/show.html.haml')
-rw-r--r--app/views/stream_entries/show.html.haml10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index 5ef72f804..1bb8a32b2 100644
--- a/app/views/stream_entries/show.html.haml
+++ b/app/views/stream_entries/show.html.haml
@@ -6,15 +6,15 @@
   %link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: account_stream_entry_url(@account, @stream_entry), format: 'json') }/
   %link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@stream_entry.activity) }/
 
-  %meta{ property: 'og:site_name', content: site_title }/
-  %meta{ property: 'og:type', content: 'article' }/
-  %meta{ property: 'og:title', content: "#{@account.username} on #{site_hostname}" }/
-  %meta{ property: 'og:url', content: account_stream_entry_url(@account, @stream_entry) }/
+  = opengraph 'og:site_name', site_title
+  = opengraph 'og:type', 'article'
+  = opengraph 'og:title', "#{@account.username} on #{site_hostname}"
+  = opengraph 'og:url', account_stream_entry_url(@account, @stream_entry)
 
   = render 'stream_entries/og_description', activity: @stream_entry.activity
   = render 'stream_entries/og_image', activity: @stream_entry.activity, account: @account
 
-  %meta{ property: 'twitter:card', content: 'summary' }/
+  = opengraph 'twitter:card', 'summary_large_image'
 
 - if show_landing_strip?
   = render partial: 'shared/landing_strip', locals: { account: @stream_entry.account }