Fix ALL-MONTHS and ALL-TAGS.
This commit is contained in:
parent
19f9aaf531
commit
e60c9f0d6c
2 changed files with 4 additions and 4 deletions
|
@ -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."
|
"Populate the base template with the provided HTML and write it out to PATH."
|
||||||
(let ((filepath (merge-pathnames path (staging *config*))))
|
(let ((filepath (merge-pathnames path (staging *config*))))
|
||||||
(ensure-directories-exist filepath)
|
(ensure-directories-exist filepath)
|
||||||
(with-open-file (out path
|
(with-open-file (out filepath
|
||||||
:direction :output
|
:direction :output
|
||||||
:if-does-not-exist :create)
|
:if-does-not-exist :create)
|
||||||
(let ((content (funcall (theme-fn "BASE")
|
(let ((content (funcall (theme-fn "BASE")
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
(defun all-months ()
|
(defun all-months ()
|
||||||
"Retrieve a list of all months with published posts."
|
"Retrieve a list of all months with published posts."
|
||||||
(remove-duplicates (mapcar (lambda (x) (subseq (post-date x) 0 7))
|
(remove-duplicates (mapcar (lambda (x) (subseq (post-date x) 0 7))
|
||||||
(hash-table-values *posts*))))
|
(hash-table-values *posts*)) :test #'string=))
|
||||||
|
|
||||||
(defun all-tags ()
|
(defun all-tags ()
|
||||||
"Retrieve a list of all tags used in posts."
|
"Retrieve a list of all tags used in posts."
|
||||||
(remove-duplicates (mapcan #'post-tags (hash-table-values *posts*))
|
(reduce (lambda (x y) (union x y :test #'string=))
|
||||||
:test #'string=))
|
(mapcar #'post-tags (hash-table-values *posts*))))
|
||||||
|
|
||||||
(defun taglinks ()
|
(defun taglinks ()
|
||||||
"Generate links to all the tag indices."
|
"Generate links to all the tag indices."
|
||||||
|
|
Loading…
Add table
Reference in a new issue