Selaa lähdekoodia

Fix ALL-MONTHS and ALL-TAGS.

Brit Butler 13 vuotta sitten
vanhempi
commit
e60c9f0d6c
2 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 1 1
      src/coleslaw.lisp
  2. 3 3
      src/indices.lisp

+ 1 - 1
src/coleslaw.lisp

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

+ 3 - 3
src/indices.lisp

@@ -3,12 +3,12 @@
3 3
 (defun all-months ()
4 4
   "Retrieve a list of all months with published posts."
5 5
   (remove-duplicates (mapcar (lambda (x) (subseq (post-date x) 0 7))
6
-                             (hash-table-values *posts*))))
6
+                             (hash-table-values *posts*)) :test #'string=))
7 7
 
8 8
 (defun all-tags ()
9 9
   "Retrieve a list of all tags used in posts."
10
-  (remove-duplicates (mapcan #'post-tags (hash-table-values *posts*))
11
-                     :test #'string=))
10
+  (reduce (lambda (x y) (union x y :test #'string=))
11
+          (mapcar #'post-tags (hash-table-values *posts*))))
12 12
 
13 13
 (defun taglinks ()
14 14
   "Generate links to all the tag indices."