about summary refs log tree commit diff
path: root/app/views/accounts/show.html.haml
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-03-09 00:35:07 +0100
committerGitHub <noreply@github.com>2018-03-09 00:35:07 +0100
commitff44b2e92d496c6027b20157fea6ebd885906bea (patch)
tree704b648e34b52910ba041c34dc49309c08e3d3d0 /app/views/accounts/show.html.haml
parent188aa3ea50799f4a81f28416fe47b3330091ef6f (diff)
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
Diffstat (limited to 'app/views/accounts/show.html.haml')
-rw-r--r--app/views/accounts/show.html.haml13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml
index 21c585dab..c62a573b0 100644
--- a/app/views/accounts/show.html.haml
+++ b/app/views/accounts/show.html.haml
@@ -1,7 +1,9 @@
 - content_for :page_title do
-  = display_name(@account)
+  = "#{display_name(@account)} (@#{@account.username})"
 
 - content_for :header_tags do
+  %meta{ name: 'description', content: account_description(@account) }/
+
   - if @account.user&.setting_noindex
     %meta{ name: 'robots', content: 'noindex' }/
 
@@ -9,6 +11,11 @@
   %link{ rel: 'alternate', type: 'application/atom+xml', href: account_url(@account, format: 'atom') }/
   %link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@account) }/
 
+  - if @older_url
+    %link{ rel: 'next', href: @older_url }/
+  - if @newer_url
+    %link{ rel: 'prev', href: @newer_url }/
+
   = opengraph 'og:type', 'profile'
   = render 'og', account: @account, url: short_account_url(@account, only_path: false)
 
@@ -42,6 +49,6 @@
   - if @newer_url || @older_url
     .pagination
       - if @older_url
-        = link_to safe_join([fa_icon('chevron-left'), t('pagination.older')], ' '), @older_url, class: 'older', rel: 'older'
+        = link_to safe_join([fa_icon('chevron-left'), t('pagination.older')], ' '), @older_url, class: 'older', rel: 'next'
       - if @newer_url
-        = link_to safe_join([t('pagination.newer'), fa_icon('chevron-right')], ' '), @newer_url, class: 'newer', rel: 'newer'
+        = link_to safe_join([t('pagination.newer'), fa_icon('chevron-right')], ' '), @newer_url, class: 'newer', rel: 'prev'