From 76d8cbe9c4edef371efb4a08037f97abff9b8d3a Mon Sep 17 00:00:00 2001 From: shopjoy Date: Tue, 15 Apr 2014 23:13:26 +1000 Subject: [PATCH 1/2] Make header, footer and sidebar links nofollow --- app/views/spree/static_content/_static_content_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/static_content/_static_content_list.html.erb b/app/views/spree/static_content/_static_content_list.html.erb index bea6cb4c..2e6d788a 100644 --- a/app/views/spree/static_content/_static_content_list.html.erb +++ b/app/views/spree/static_content/_static_content_list.html.erb @@ -2,6 +2,6 @@
  • <%= link_to page.title, page.foreign_link, {:target => "_blank"} %>
  • <% else %> <% page_uri = Rails.application.routes.named_routes[:spree].path.spec.to_s == '/' ? page.slug : Rails.application.routes.named_routes[:spree].path.spec.to_s + page.slug %> -
  • ><%= link_to page.title, page_uri %>
  • +
  • ><%= link_to page.title, page_uri, :rel => "nofollow" %>
  • <% end %> From a73e09b434b91911aae4f0db520833f03f9539a1 Mon Sep 17 00:00:00 2001 From: shopjoy Date: Sat, 17 May 2014 12:49:48 +1000 Subject: [PATCH 2/2] Make foreign link nofollow --- app/views/spree/static_content/_static_content_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/static_content/_static_content_list.html.erb b/app/views/spree/static_content/_static_content_list.html.erb index 2e6d788a..1195fd28 100644 --- a/app/views/spree/static_content/_static_content_list.html.erb +++ b/app/views/spree/static_content/_static_content_list.html.erb @@ -1,5 +1,5 @@ <% if page.foreign_link.present? %> -
  • <%= link_to page.title, page.foreign_link, {:target => "_blank"} %>
  • +
  • <%= link_to page.title, page.foreign_link, {:target => "_blank", :ref => "nofollow"} %>
  • <% else %> <% page_uri = Rails.application.routes.named_routes[:spree].path.spec.to_s == '/' ? page.slug : Rails.application.routes.named_routes[:spree].path.spec.to_s + page.slug %>
  • ><%= link_to page.title, page_uri, :rel => "nofollow" %>