Recently Written · git

coleslaw

Emacs mode for the "Coleslaw" site generator written in Common Lisp.

git clone https://github.com/equwal/coleslaw

Log | Files | Refs


commit 96ae19b146afa3af506630983e5113d072ba561e
Konrad Hinsen <konrad.hinsen@fastmail.net>
2023-11-15 09:48:52 +0100

Ensure that index.html points to the most recent index page

 src/coleslaw.lisp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp
index 57113c1..4fecf70 100644
--- a/src/coleslaw.lisp
+++ b/src/coleslaw.lisp
@@ -42,7 +42,10 @@
       (publish ctype))
     (do-subclasses (itype index)
       (publish itype))
-    (let ((recent-posts (first (find-all 'numeric-index))))
+    (let ((recent-posts (reduce #'(lambda (a b)
+                                    (if (< (index-name a) (index-name b))
+                                        a b))
+                                (find-all 'numeric-index))))
       (update-symlink "index.html" (page-url recent-posts)))))
 
 (defgeneric deploy (staging)