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:
@@ -2,8 +2,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<title><%= page_title %></title>
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="top" title="<%= Danbooru.config.app_name %>" href="/">
|
||||
|
||||
<% if @current_item.try(:prev_page) %>
|
||||
<%= tag.link rel: "prev", href: url_for(nav_params_for(@current_item.prev_page)) %>
|
||||
<% end %>
|
||||
|
||||
<% if @current_item.try(:next_page) %>
|
||||
<%= tag.link rel: "next", href: url_for(nav_params_for(@current_item.next_page)) %>
|
||||
<% end %>
|
||||
|
||||
<%= csrf_meta_tag %>
|
||||
<% unless CurrentUser.disable_responsive_mode? %>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
@@ -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? %>
|
||||
|
||||
Reference in New Issue
Block a user