seo: add rel=nofollow to various internal search links.

Add rel=nofollow to various internal search links to prevent Google from
attempting to crawl things like `<tag> status:deleted` or `approver:<name>`
searches.
This commit is contained in:
evazion
2020-07-03 14:39:23 -05:00
parent 629a634b22
commit 99e88b3dae
8 changed files with 18 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
This post has <%= link_to pluralize(children.length, "child"), posts_path(tags: "parent:#{parent.id}") %>
This post has <%= link_to pluralize(children.length, "child"), posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %>
(<%= link_to_wiki "learn more", "help:post_relationships" %>)
<%= link_to("« hide", "#", id: "has-children-relationship-preview-link") %>

View File

@@ -1,8 +1,8 @@
This post belongs to a <%= link_to "parent", posts_path(tags: "parent:#{parent.id}") %> <% "(deleted)" if parent.is_deleted? %>
This post belongs to a <%= link_to "parent", posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %> <% "(deleted)" if parent.is_deleted? %>
<% children.length.tap do |children_count| %>
<% if children_count > 1 %>
and has <%= link_to pluralize(children_count - 1, "sibling"), posts_path(tags: "parent:#{parent.id}") %>
and has <%= link_to pluralize(children_count - 1, "sibling"), posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %>
<% end %>
<% end %>