add rel meta links for prev and next page

This commit is contained in:
r888888888
2017-10-11 15:31:13 -07:00
parent facb351552
commit d883de258c
2 changed files with 23 additions and 1 deletions

View File

@@ -63,7 +63,11 @@
<%= content_for(:html_header) do %>
<link href="<%= posts_path(:format => 'atom', :tags => params[:tags]) %>" rel="alternate" title="ATOM" type="application/atom+xml" />
<%= content_tag(:link, nil, rel: "prefetch", href: posts_path(tags: params[:tags], page: (params[:page] || 1).to_i + 1), as: "html", crossorigin: "use-credentials") %>
<%= content_tag(:link, nil, rel: "prefetch", href: next_page_url, as: "html", crossorigin: "use-credentials") %>
<%= content_tag :link, nil, rel: "next", href: next_page_url %>
<% if prev_page_url %>
<%= content_tag :link, nil, rel: "prev", href: prev_page_url %>
<% end %>
<% if @post_set.has_wiki? %>
<meta name="description" content="<%= @post_set.wiki_page.presenter.blurb %>">
<% else %>