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:
@@ -14,7 +14,7 @@
|
||||
<% end %>
|
||||
<% t.column "Other Names", td: {class: "col-expand"} do |artist| %>
|
||||
<% artist.other_names.each do |name| %>
|
||||
<%= link_to name, artists_path(search: { any_name_matches: name }), class: "artist-other-name" %>
|
||||
<%= link_to name, artists_path(search: { any_name_matches: name }), class: "artist-other-name", rel: "nofollow" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% t.column "Status" do |artist| %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= render layout: "show" do %>
|
||||
<div>
|
||||
<p>This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(artist: { name: params[:name] }) %>.</p>
|
||||
<p>This artist entry does not exist. <%= link_to "Create new artist entry", new_artist_path(artist: { name: params[:name] }), rel: "nofollow" %>.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</h4>
|
||||
Creator: <%= link_to_user post_set.favgroup.creator %>
|
||||
<% elsif post_set.has_blank_wiki? %>
|
||||
<p>There is currently no wiki page for the tag <%= link_to_wiki post_set.tag.pretty_name %>. You can <%= link_to "create one", new_wiki_page_path(wiki_page: { title: post_set.tag.name }) %>.</p>
|
||||
<p>There is currently no wiki page for the tag <%= link_to_wiki post_set.tag.pretty_name %>. You can <%= link_to "create one", new_wiki_page_path(wiki_page: { title: post_set.tag.name }), rel: "nofollow" %>.</p>
|
||||
|
||||
<%= render "tag_relationships/alias_and_implication_list", tag: post_set.tag %>
|
||||
<% end %>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<li><%= link_to "Viewed", viewed_explore_posts_path %></li>
|
||||
<% end %>
|
||||
|
||||
<li><%= link_to "Deleted", posts_path(tags: "#{params[:tags]} status:deleted") %></li>
|
||||
<li><%= link_to "Random", random_posts_path(tags: params[:tags]), id: "random-post", "data-shortcut": "r" %></li>
|
||||
<li><%= link_to "Deleted", posts_path(tags: "#{params[:tags]} status:deleted"), rel: "nofollow" %></li>
|
||||
<li><%= link_to "Random", random_posts_path(tags: params[:tags]), id: "random-post", "data-shortcut": "r", rel: "nofollow" %></li>
|
||||
<% if post_set.query.is_simple_tag? %>
|
||||
<li><%= link_to "History", post_versions_path(search: { changed_tags: params[:tags] }) %></li>
|
||||
<li><%= link_to "History", post_versions_path(search: { changed_tags: params[:tags] }), rel: "nofollow" %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "Count", posts_counts_path(:tags => params[:tags]) %></li>
|
||||
<li><%= link_to "Count", posts_counts_path(tags: params[:tags]), rel: "nofollow" %></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -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") %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if @wiki_page.new_record? %>
|
||||
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(wiki_page: { title: @wiki_page.title }) %>.</p>
|
||||
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(wiki_page: { title: @wiki_page.title }), rel: "nofollow" %>.</p>
|
||||
<% else %>
|
||||
<%= format_text(@wiki_page.body) %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user