From 005e1f00b627bb5df6194b41f9a35dbcd7ce57bd Mon Sep 17 00:00:00 2001 From: Joe Clay <27cupsofcoffee@gmail.com> Date: Sun, 12 Aug 2018 13:09:46 +0100 Subject: [PATCH 1/2] Update page variable list for custom taxonomies I love the new support for custom taxonomies! I got a little thrown off when updating my site, though, as the docs didn't specify how the page would expose the taxonomies to the template. Wasn't too hard to figure it out, but I figured I'd save the next person who tries it the effort :) --- docs/content/documentation/templates/pages-sections.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/content/documentation/templates/pages-sections.md b/docs/content/documentation/templates/pages-sections.md index 297c95b3..4abd4a82 100644 --- a/docs/content/documentation/templates/pages-sections.md +++ b/docs/content/documentation/templates/pages-sections.md @@ -25,8 +25,7 @@ draft: Bool; components: Array; permalink: String; summary: String?; -tags: Array; -category: String?; +taxonomies: HashMap>; extra: HashMap; // Naive word count, will not work for languages without whitespace word_count: Number; From e99bdd07ac60196dc6f391c0fd77cd529c8444a5 Mon Sep 17 00:00:00 2001 From: Tim DuBois Date: Mon, 27 Aug 2018 21:37:50 +0200 Subject: [PATCH 2/2] Update pagination for test_site posts --- test_site/content/posts/_index.md | 1 + test_site/templates/page.html | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test_site/content/posts/_index.md b/test_site/content/posts/_index.md index cbb56093..e9f7069d 100644 --- a/test_site/content/posts/_index.md +++ b/test_site/content/posts/_index.md @@ -3,4 +3,5 @@ title = "Posts" paginate_by = 2 template = "section_paginated.html" insert_anchor_links = "left" +sort_by = "date" +++ diff --git a/test_site/templates/page.html b/test_site/templates/page.html index 25e0455d..8f4373af 100644 --- a/test_site/templates/page.html +++ b/test_site/templates/page.html @@ -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 %}