From 334d0443b6cbeec372bd0ee1288e7f0813b85a7d Mon Sep 17 00:00:00 2001 From: Josh Glover Date: Sun, 4 Feb 2024 15:42:57 +0100 Subject: [PATCH] Add page links example to README --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index bddb575..0d5605a 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,26 @@ Resources for understanding and testing social sharing: - [LinkedIn Post Inspector](https://www.linkedin.com/post-inspector/) - [Twitter Card Validator](https://cards-dev.twitter.com/validator) +### Post links + +quickblog adds `prev` and `next` metadata to each post (where `prev` is the +previous post and `next` is the next post in date order, oldest to newest). You +can make use of these by adding something similar to this to your `post.html` +template: + +``` html +{% if any prev next %} +
+{% if prev %} +
{{prev.title}}
+{% endif %} +{% if next %} +
{{next.title}}
+{% endif %} +
+{% endif %} +``` + ## Templates quickblog uses the following templates in site generation: