From c7c8d7affbcb574341bde8411ab493f8d5ad4ea3 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Mon, 21 Feb 2022 14:23:06 -0500 Subject: [scheme] Fix sorting for tag queries --- haunt/jakob/builder/blog.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'haunt/jakob/builder') diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm index f6c64c1..8f02a80 100644 --- a/haunt/jakob/builder/blog.scm +++ b/haunt/jakob/builder/blog.scm @@ -156,7 +156,8 @@ only the posts tagged with that tag." (items->pages render-preview posts (format #f "Posts tagged with \"~a\"" tag) (tag-uri %tag-prefix tag "")))) - (group-by-tag posts (cut post-ref <> 'tags)))) + (group-by-tag (sort posts (lambda (a b) + (timetime-monotonic (post-date a)) (date->time-monotonic (post-date b))))) (cut post-ref <> 'tags)))) (define (all-tags posts) "Return a page summarizing tag usage across POSTS." -- cgit v1.3