chiark / gitweb /
theme: provide <link rel="prev"> etc. for paginated listings.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 11 Oct 2017 19:36:00 +0000 (21:36 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 11 Oct 2017 19:54:40 +0000 (21:54 +0200)
pelican-theme/templates/archives.html
pelican-theme/templates/base_blog_section.html

index 638486b403c2eb9df944c9f3038c00c62b0b2add..08589117bbfc2f678b8104abf9073f64c2e11d27 100644 (file)
@@ -1,4 +1,15 @@
 {% extends "base_blog.html" %}
+
+{% block head %}
+  {{- super() -}}
+  {% if articles_page.has_previous() %}
+  <link rel="prev" href="{{ articles_previous_page.url }}" />
+  {% endif %}
+  {% if articles_page.has_next() %}
+  <link rel="next" href="{{ articles_next_page.url }}" />
+  {% endif %}
+{% endblock head %}
+
 {% block content %}
     <div class="m-col-m-10">
       {% block content_title %}
index 72211f1717124eaf20bd6e56f4553a59c62990be..1dfaf35024ac4f4157a39be371b6cd4da2d567a3 100644 (file)
@@ -1,4 +1,15 @@
 {% extends "base_blog.html" %}
+
+{% block head %}
+  {{- super() -}}
+  {% if articles_page.has_previous() %}
+  <link rel="prev" href="{{ articles_previous_page.url }}" />
+  {% endif %}
+  {% if articles_page.has_next() %}
+  <link rel="next" href="{{ articles_next_page.url }}" />
+  {% endif %}
+{% endblock head %}
+
 {% block content %}
     <div class="m-col-m-10">
       {% block content_title %}