From 96ae19b146afa3af506630983e5113d072ba561e Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Wed, 15 Nov 2023 09:48:52 +0100 Subject: [PATCH] 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)