From 5f0ba707418d3b393ffd1dd62e50a7532b647ee8 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Fri, 24 Jul 2020 22:36:58 -0500 Subject: [PATCH] Updated status meta description and title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - status meta description and title --- app/views/stream_entries/_meta.html.haml | 6 ++++-- app/views/stream_entries/_og_description.html.haml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/stream_entries/_meta.html.haml b/app/views/stream_entries/_meta.html.haml index 17f84ab4..4c2a8b26 100644 --- a/app/views/stream_entries/_meta.html.haml +++ b/app/views/stream_entries/_meta.html.haml @@ -1,5 +1,7 @@ +- the_title = "#{display_name(account)} on Gab" + - content_for :page_title do - = "#{display_name(account)} on Gab" + = the_title - content_for :header_tags do - if account.user&.setting_noindex @@ -11,7 +13,7 @@ = opengraph 'og:site_name', site_title = opengraph 'og:type', 'article' - = opengraph 'og:title', t('statuses.title', name: display_name(account), quote: stream_entry.activity.spoiler_text.presence || stream_entry.activity.text) + = opengraph 'og:title', the_title = opengraph 'og:url', short_account_status_url(account, stream_entry.activity) = render 'stream_entries/og_description', activity: stream_entry.activity, account: account diff --git a/app/views/stream_entries/_og_description.html.haml b/app/views/stream_entries/_og_description.html.haml index e9921bb3..69cd7ae4 100644 --- a/app/views/stream_entries/_og_description.html.haml +++ b/app/views/stream_entries/_og_description.html.haml @@ -1,4 +1,4 @@ -- description = t('statuses.title', name: display_name(account), quote: truncate(activity.spoiler_text.presence || activity.text, length: 50, omission: '…', escape: false)) +- description = activity.spoiler_text.presence || activity.text %meta{ name: 'description', content: description }/ = opengraph 'og:description', description