From ff44b2e92d496c6027b20157fea6ebd885906bea Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 9 Mar 2018 00:35:07 +0100 Subject: Add missing meta description to profiles, some other SEO stuff (#6706) - Add missing meta description to profiles - Add canonical rel link to landing page - Remove linebreaks from title tags - Add username to profile title - Add toots/following/followers to profile description tags - Add next/prev rel links to profiles - Do not index follower/following variants of profiles --- app/helpers/stream_entries_helper.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'app/helpers/stream_entries_helper.rb') diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb index 445114985..54b92bdf4 100644 --- a/app/helpers/stream_entries_helper.rb +++ b/app/helpers/stream_entries_helper.rb @@ -8,6 +8,27 @@ module StreamEntriesHelper account.display_name.presence || account.username end + def account_description(account) + prepend_str = [ + [ + number_to_human(account.statuses_count, strip_insignificant_zeros: true), + t('accounts.posts'), + ].join(' '), + + [ + number_to_human(account.following_count, strip_insignificant_zeros: true), + t('accounts.following'), + ].join(' '), + + [ + number_to_human(account.followers_count, strip_insignificant_zeros: true), + t('accounts.followers'), + ].join(' '), + ].join(', ') + + [prepend_str, account.note].join(' ยท ') + end + def stream_link_target embedded_view? ? '_blank' : nil end -- cgit