Fix #1883: Add <link> elements for all paginated pages.

Add <link rel="prev"> and <link rel="next"> elements to most pages with
pagination. This should work on all index pages, but it won't work for
things like pool or forum topic show pages.

Also remove the <link rel="top"> element (wasn't useful, was just a link
back to the root url).
This commit is contained in:
evazion
2020-01-29 22:18:59 -06:00
parent c7185724d5
commit edfef10dc9
4 changed files with 34 additions and 20 deletions

View File

@@ -10,11 +10,6 @@
<% atom_feed_tag "Posts: #{@post_set.tag_string}", posts_url(tags: @post_set.tag_string, format: :atom) %>
<% end %>
<%= tag.link href: posts_path(format: "atom", tags: params[:tags]), rel: "alternate", title: "ATOM", type: "application/atom+xml" %>
<%= tag.link rel: "next", href: next_page_url %>
<% if prev_page_url %>
<%= tag.link rel: "prev", href: prev_page_url %>
<% end %>
<%= missed_post_search_count_js %>
<% if @post_set.hide_from_crawler? %>