Sort the ALL-MONTHS and ALL-TAGS results.

This commit is contained in:
Brit Butler 2012-08-21 19:57:57 -04:00
parent 2c2af43c76
commit 69648e72e1

View file

@ -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."