From fe31b43b756f13bb2346729c1f5f213b29f8562c Mon Sep 17 00:00:00 2001 From: Effy Elden Date: Fri, 6 Jan 2017 09:47:40 +1100 Subject: [PATCH] Add twitter:card metatag to enable Twitter Cards support --- app/views/about/index.html.haml | 1 + app/views/accounts/show.html.haml | 1 + app/views/stream_entries/show.html.haml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/app/views/about/index.html.haml b/app/views/about/index.html.haml index 6dd1822059..b0260dc516 100644 --- a/app/views/about/index.html.haml +++ b/app/views/about/index.html.haml @@ -9,6 +9,7 @@ %meta{ property: 'og:image', content: asset_url('mastodon_small.jpg') }/ %meta{ property: 'og:image:width', content: '400' }/ %meta{ property: 'og:image:height', content: '400' }/ + %meta{ property: 'twitter:card', content: 'summary' }/ .wrapper %h1 diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml index 7afeb68a97..bc0f08a798 100644 --- a/app/views/accounts/show.html.haml +++ b/app/views/accounts/show.html.haml @@ -12,6 +12,7 @@ %meta{ property: 'og:image', content: full_asset_url(@account.avatar.url(:original)) }/ %meta{ property: 'og:image:width', content: '120' }/ %meta{ property: 'og:image:height', content: '120' }/ + %meta{ property: 'twitter:card', content: 'summary' }/ = render partial: 'header' diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml index 43935da60f..d106173d2e 100644 --- a/app/views/stream_entries/show.html.haml +++ b/app/views/stream_entries/show.html.haml @@ -14,5 +14,7 @@ %meta{ property: 'og:image:width', content: '120' }/ %meta{ property: 'og:image:height', content: '120' }/ + %meta{ property: 'twitter:card', content: 'summary' }/ + .activity-stream.activity-stream-headless = render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true }