about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-07-14 16:41:02 +0200
committerGitHub <noreply@github.com>2017-07-14 16:41:02 +0200
commitc42092ba7ad1cbf78ca8463b6525ec2b7efbdd92 (patch)
treecd2905803ff282f6a72fc449f24ede4312aff813 /app/views
parent999170d898fbe98e634f827580695c0615370f75 (diff)
Add option to opt out of search engines on public profile/status pages (#4199)
Diffstat (limited to 'app/views')
-rw-r--r--app/views/accounts/show.html.haml3
-rw-r--r--app/views/follower_accounts/index.html.haml3
-rw-r--r--app/views/following_accounts/index.html.haml3
-rw-r--r--app/views/layouts/embedded.html.haml2
-rw-r--r--app/views/settings/preferences/show.html.haml3
-rw-r--r--app/views/stream_entries/show.html.haml3
6 files changed, 17 insertions, 0 deletions
diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml
index a19049103..7ed634e5d 100644
--- a/app/views/accounts/show.html.haml
+++ b/app/views/accounts/show.html.haml
@@ -2,6 +2,9 @@
   = display_name(@account)
 
 - content_for :header_tags do
+  - if @account.user&.setting_noindex
+    %meta{ name: 'robots', content: 'noindex' }/
+
   %link{ rel: 'salmon', href: api_salmon_url(@account.id) }/
   %link{ rel: 'alternate', type: 'application/atom+xml', href: account_url(@account, format: 'atom') }/
 
diff --git a/app/views/follower_accounts/index.html.haml b/app/views/follower_accounts/index.html.haml
index 89c7f3a29..738b31638 100644
--- a/app/views/follower_accounts/index.html.haml
+++ b/app/views/follower_accounts/index.html.haml
@@ -2,6 +2,9 @@
   = t('accounts.people_who_follow', name: display_name(@account))
 
 - content_for :header_tags do
+  - if @account.user&.setting_noindex
+    %meta{ name: 'robots', content: 'noindex' }/
+
   = render 'accounts/og', account: @account, url: account_followers_url(@account, only_path: false)
 
 = render 'accounts/header', account: @account
diff --git a/app/views/following_accounts/index.html.haml b/app/views/following_accounts/index.html.haml
index 6f0de7590..9637c689f 100644
--- a/app/views/following_accounts/index.html.haml
+++ b/app/views/following_accounts/index.html.haml
@@ -2,6 +2,9 @@
   = t('accounts.people_followed_by', name: display_name(@account))
 
 - content_for :header_tags do
+  - if @account.user&.setting_noindex
+    %meta{ name: 'robots', content: 'noindex' }/
+
   = render 'accounts/og', account: @account, url: account_followers_url(@account, only_path: false)
 
 = render 'accounts/header', account: @account
diff --git a/app/views/layouts/embedded.html.haml b/app/views/layouts/embedded.html.haml
index 4826f32f7..46dab2d0f 100644
--- a/app/views/layouts/embedded.html.haml
+++ b/app/views/layouts/embedded.html.haml
@@ -2,6 +2,8 @@
 %html{ lang: I18n.locale }
   %head
     %meta{ charset: 'utf-8' }/
+    %meta{ name: 'robots', content: 'noindex' }/
+
     = stylesheet_pack_tag 'common', media: 'all'
     = javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
     = javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml
index 56a261ab6..3b5d90942 100644
--- a/app/views/settings/preferences/show.html.haml
+++ b/app/views/settings/preferences/show.html.haml
@@ -41,6 +41,9 @@
       = ff.input :must_be_following, as: :boolean, wrapper: :with_label
 
   .fields-group
+    = f.input :setting_noindex, as: :boolean, wrapper: :with_label
+
+  .fields-group
     = f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
     = f.input :setting_delete_modal, as: :boolean, wrapper: :with_label
 
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index d01e82af8..80ea30eb1 100644
--- a/app/views/stream_entries/show.html.haml
+++ b/app/views/stream_entries/show.html.haml
@@ -1,4 +1,7 @@
 - content_for :header_tags do
+  - if @account.user&.setting_noindex
+    %meta{ name: 'robots', content: 'noindex' }/
+
   %link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/
   %link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: account_stream_entry_url(@account, @stream_entry), format: 'json') }/