Fix ALL-MONTHS and ALL-TAGS.

This commit is contained in:
Brit Butler 2012-08-21 19:29:43 -04:00
parent 19f9aaf531
commit e60c9f0d6c
2 changed files with 4 additions and 4 deletions

View file

@ -25,7 +25,7 @@ on files that match the given extension."
"Populate the base template with the provided HTML and write it out to PATH."
(let ((filepath (merge-pathnames path (staging *config*))))
(ensure-directories-exist filepath)
(with-open-file (out path
(with-open-file (out filepath
:direction :output
:if-does-not-exist :create)
(let ((content (funcall (theme-fn "BASE")

View file

@ -3,12 +3,12 @@
(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*))))
(hash-table-values *posts*)) :test #'string=))
(defun all-tags ()
"Retrieve a list of all tags used in posts."
(remove-duplicates (mapcan #'post-tags (hash-table-values *posts*))
:test #'string=))
(reduce (lambda (x y) (union x y :test #'string=))
(mapcar #'post-tags (hash-table-values *posts*))))
(defun taglinks ()
"Generate links to all the tag indices."