Browse Source

Merge pull request #389 from Libbum/pagination

Update pagination for test_site posts
index-subcmd
Vincent Prouillet GitHub 5 years ago
parent
commit
5ed489d4f2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions
  1. +1
    -2
      docs/content/documentation/templates/pages-sections.md
  2. +1
    -0
      test_site/content/posts/_index.md
  3. +2
    -2
      test_site/templates/page.html

+ 1
- 2
docs/content/documentation/templates/pages-sections.md View File

@@ -25,8 +25,7 @@ draft: Bool;
components: Array<String>;
permalink: String;
summary: String?;
tags: Array<String>;
category: String?;
taxonomies: HashMap<String, Array<String>>;
extra: HashMap<String, Any>;
// Naive word count, will not work for languages without whitespace
word_count: Number;


+ 1
- 0
test_site/content/posts/_index.md View File

@@ -3,4 +3,5 @@ title = "Posts"
paginate_by = 2
template = "section_paginated.html"
insert_anchor_links = "left"
sort_by = "date"
+++

+ 2
- 2
test_site/templates/page.html View File

@@ -3,6 +3,6 @@
{% block content %}
{{ page.content | safe }}

{% if page.previous %}Previous article: {{ page.previous.permalink }}{% endif %}
{% if page.next %}Next article: {{ page.next.permalink }}{% endif %}
{% if page.earlier %}Previous article: {{ page.earlier.permalink }}{% endif %}
{% if page.later %}Next article: {{ page.later.permalink }}{% endif %}
{% endblock content %}

Loading…
Cancel
Save