diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.org> | 2022-02-21 14:23:06 -0500 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.org> | 2022-02-21 14:31:31 -0500 |
| commit | c7c8d7affbcb574341bde8411ab493f8d5ad4ea3 (patch) | |
| tree | 7f7dfa8a39d899db4759bd7727b06231773c803d | |
| parent | ac76a0d2d0b6792a212769a7af0cd24da4f5dc36 (diff) | |
[scheme] Fix sorting for tag queries
| -rw-r--r-- | haunt/jakob/builder/blog.scm | 3 |
1 files changed, 2 insertions, 1 deletions
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) + (time<? (date->time-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." |