From 69648e72e1d1a8f16db76731098498dcdc077758 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Tue, 21 Aug 2012 19:57:57 -0400 Subject: [PATCH] Sort the ALL-MONTHS and ALL-TAGS results. --- src/indices.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/indices.lisp b/src/indices.lisp index 37d6814..c28bc24 100644 --- a/src/indices.lisp +++ b/src/indices.lisp @@ -2,13 +2,15 @@ (defun all-months () "Retrieve a list of all months with published posts." - (remove-duplicates (mapcar (lambda (x) (subseq (post-date x) 0 7)) - (hash-table-values *posts*)) :test #'string=)) + (sort (remove-duplicates (mapcar (lambda (x) (subseq (post-date x) 0 7)) + (hash-table-values *posts*)) :test #'string=) + #'string<)) (defun all-tags () "Retrieve a list of all tags used in posts." - (reduce (lambda (x y) (union x y :test #'string=)) - (mapcar #'post-tags (hash-table-values *posts*)))) + (sort (reduce (lambda (x y) (union x y :test #'string=)) + (mapcar #'post-tags (hash-table-values *posts*))) + #'string<)) (defun taglinks () "Generate links to all the tag indices."