From 3d0b7f10349e84912f4980e6ecac3bca6796ba7a Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 21 Apr 2017 16:40:16 +0200 Subject: [PATCH 1/5] prevents pages indexation on robots.txt --- public/robots.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/robots.txt b/public/robots.txt index 3c9c7c01f..93780f8d1 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -3,3 +3,10 @@ # To ban all spiders from the entire site uncomment the next two lines: # User-agent: * # Disallow: / + +Disallow: /users/ +Disallow: /comments/ + +Disallow: /*?*locale +Disallow: /*?*order +Disallow: /*?*search From 8b42d57e18ee8a1c77422e154d7cd059bea9b3ff Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 21 Apr 2017 16:59:11 +0200 Subject: [PATCH 2/5] adds rel nofollow on links --- app/views/devise/menu/_login_items.html.erb | 17 +++++++++++------ app/views/layouts/_footer.html.erb | 14 +++++++------- app/views/shared/_top_links.html.erb | 3 +++ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/app/views/devise/menu/_login_items.html.erb b/app/views/devise/menu/_login_items.html.erb index b7db4a22c..5d493131d 100644 --- a/app/views/devise/menu/_login_items.html.erb +++ b/app/views/devise/menu/_login_items.html.erb @@ -1,6 +1,6 @@ <% if user_signed_in? %>
  • - <%= link_to notifications_path, class: "notifications" do %> + <%= link_to notifications_path, rel: "nofollow", class: "notifications" do %> <%= t("layouts.header.notifications") %> <% if current_user.notifications_count > 0 %> @@ -12,19 +12,24 @@ <% end %>
  • - <%= link_to t("layouts.header.my_activity_link"), user_path(current_user) %> + <%= link_to t("layouts.header.my_activity_link"), + user_path(current_user), rel: "nofollow" %>
  • - <%= link_to t("layouts.header.my_account_link"), account_path %> + <%= link_to t("layouts.header.my_account_link"), + account_path, rel: "nofollow" %>
  • - <%= link_to t("devise_views.menu.login_items.logout"), destroy_user_session_path, method: :delete %> + <%= link_to t("devise_views.menu.login_items.logout"), + destroy_user_session_path, rel: "nofollow", method: :delete %>
  • <% else %>
  • - <%= link_to t("devise_views.menu.login_items.login"), new_user_session_path %> + <%= link_to t("devise_views.menu.login_items.login"), + new_user_session_path, rel: "nofollow" %>
  • - <%= link_to t("devise_views.menu.login_items.signup"), new_user_registration_path, class: "button" %> + <%= link_to t("devise_views.menu.login_items.signup"), + new_user_registration_path, rel: "nofollow", class: "button" %>
  • <% end %> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 0bce1cd67..35e7d63a0 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -25,14 +25,14 @@

    - <%= link_to t("layouts.footer.transparency_title"), setting['transparency_url'].presence || t("layouts.footer.transparency_url") %> + <%= link_to t("layouts.footer.transparency_title"), setting['transparency_url'].presence || t("layouts.footer.transparency_url"), rel: "nofollow" %>

    <%= t("layouts.footer.transparency_text") %>

    - <%= link_to t("layouts.footer.open_data_title"), setting['opendata_url'].presence || t("layouts.header.external_link_opendata_url") %> + <%= link_to t("layouts.footer.open_data_title"), setting['opendata_url'].presence || t("layouts.header.external_link_opendata_url"), rel: "nofollow" %>

    <%= t("layouts.footer.open_data_text") %>

    @@ -54,7 +54,7 @@