Indicate the relationship between component URLs in a paginated series
- Apply rel="prev" and rel="next" to pages that use site.paginator - Ref ~> https://webmasters.googleblog.com/2011/09/pagination-with-relnext-and-relprev.html - Close #253
This commit is contained in:
parent
54a8646901
commit
6d31ffe4ab
1 changed files with 7 additions and 6 deletions
|
@ -92,12 +92,13 @@
|
|||
{% if page.date %}
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
|
||||
{% if page.next.url %}
|
||||
<link rel="next" href="{{ page.next.url | prepend: seo_url | replace: "/index.html", "/" }}" title="{{ page.next.title | escape }}">
|
||||
{% endif %}
|
||||
{% if page.previous.url %}
|
||||
<link rel="prev" href="{{ page.previous.url | prepend: seo_url | replace: "/index.html", "/" }}" title="{{ page.previous.title | escape }}">
|
||||
|
||||
{% if paginator.previous_page %}
|
||||
<link rel="prev" href="{{ paginator.previous_page_path | prepend: seo_url }}">
|
||||
{% endif %}
|
||||
{% if paginator.next_page %}
|
||||
<link rel="next" href="{{ paginator.next_page_path | prepend: seo_url }}">
|
||||
{% endif %}
|
||||
|
||||
{% if site.og_image %}
|
||||
|
|
Loading…
Reference in a new issue