Remove rel="nofollow" from internal links.

This was used to discourage crawlers from crawling certain pages we
didn't want them to crawl, primarily post searches.

Remove because there are better ways to control crawling. Some of these
links weren't even visible to crawlers anyway. This lets us be
consistent about only applying rel="nofollow" to external links.
This commit is contained in:
evazion
2019-10-13 18:53:46 -05:00
parent 8bffe8dba1
commit 7ebf6ed9d7
5 changed files with 8 additions and 8 deletions

View File

@@ -129,8 +129,8 @@ class TagSetPresenter < Presenter
end
if show_extra_links && current_query.present?
html << %{<a rel="nofollow" href="/posts?tags=#{u(current_query)}+#{u(name)}" class="search-inc-tag">+</a> }
html << %{<a rel="nofollow" href="/posts?tags=#{u(current_query)}+-#{u(name)}" class="search-exl-tag">&ndash;</a> }
html << %{<a href="/posts?tags=#{u(current_query)}+#{u(name)}" class="search-inc-tag">+</a> }
html << %{<a href="/posts?tags=#{u(current_query)}+-#{u(name)}" class="search-exl-tag">&ndash;</a> }
end
end

View File

@@ -12,8 +12,8 @@
<% end %>
<% end %>
<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", :rel => "nofollow", :"data-shortcut" => "r" %></li>
<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>
<% if Tag.is_simple_tag?(params[:tags]) %>
<li><%= link_to "History", post_versions_path(search: { changed_tags: params[:tags] }) %></li>
<% end %>

View File

@@ -4,7 +4,7 @@
<li id="post-info-uploader">Uploader: <%= link_to_user(post.uploader) %></li>
<% end %>
<li id="post-info-date">
Date: <%= link_to time_ago_in_words_tagged(post.created_at), posts_path(:tags => "date:#{post.created_at.to_date}"), :rel => "nofollow" %>
Date: <%= link_to time_ago_in_words_tagged(post.created_at), posts_path(tags: "date:#{post.created_at.to_date}") %>
<meta itemprop="uploadDate" content="<%= post.created_at.iso8601 %>">
</li>
<% if post.approver %>

View File

@@ -1,9 +1,9 @@
<div id="search-seq-nav">
<ul>
<li class="active">
<%= link_to "&lsaquo;&thinsp;prev".html_safe, show_seq_post_path(post, :q => params[:q], :seq => "prev"), :rel => "prev nofollow", :class => "prev" %>
<%= link_to "&lsaquo;&thinsp;prev".html_safe, show_seq_post_path(post, q: params[:q], seq: "prev"), rel: "prev", class: "prev" %>
<span class="search-name">Search: <%= params[:q].presence || "status:any" %></span>
<%= link_to "next&thinsp;&rsaquo;".html_safe, show_seq_post_path(post, :q => params[:q], :seq => "next"), :rel => "next nofollow", :class => "next" %>
<%= link_to "next&thinsp;&rsaquo;".html_safe, show_seq_post_path(post, q: params[:q], seq: "next"), rel: "next", class: "next" %>
</li>
</ul>
</div>

View File

@@ -13,7 +13,7 @@
<% if CurrentUser.is_member? %>
<span id="desktop-version-link" class="mobile-only">
&ndash;
<%= link_to "Disable responsive mode", edit_user_path(CurrentUser.id), :rel => "nofollow" %>
<%= link_to "Disable responsive mode", edit_user_path(CurrentUser.id) %>
</span>
<% end %>
</footer>