summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-01-18 12:19:44 +0000
committerChristopher Baines <mail@cbaines.net>2020-01-18 12:19:44 +0000
commiteedd35be26ffb9a4bd1381bd06426467393758f3 (patch)
treed79e27ef72146f53b12b5dae04b863cf71c27748
parentd97f327f670d881b72f3b818502e29e9fbcb2e6b (diff)
downloadweekly-news-eedd35be26ffb9a4bd1381bd06426467393758f3.tar
weekly-news-eedd35be26ffb9a4bd1381bd06426467393758f3.tar.gz
Fix blog when there are less than 8 posts
-rw-r--r--haunt.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/haunt.scm b/haunt.scm
index ef11d84..b3244ce 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -36,7 +36,9 @@
#:collections
`(("Recent posts" "index.html"
,(compose (lambda (posts)
- (take posts 8))
+ (if (< (length posts) 8)
+ posts
+ (take posts 8)))
filter-posts-remove-future-drafts
posts/reverse-chronological))
("All posts" "all.html"