commit 5c7d172538733c421eb5bae3d32401544dbc2362 parent a070e51f28e8e213e0d6316b76d5177b4b128b0a Author: Decay <decaydjk@tilde.town> Date: Mon, 10 Feb 2020 22:45:10 +0000 Modifying the index page to have top 10 posts Diffstat:
M | src/content.lisp | | | 11 | ++++++----- |
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/content.lisp b/src/content.lisp @@ -104,12 +104,13 @@ (defun gen-index-impl (entries archive-date-list &key generator tz) (if (not entries) (funcall (or generator (make-generator)) nil :tz tz) - (let* ((year-month (year-month-of-latest-entry entries :tz tz)) - (entry-year (car year-month)) - (entry-month (cdr year-month)) - (latest-month-entries (collect-entries-for-month entries entry-year entry-month tz))) + (let* ((index-entries + (subseq entries 0 + (if (>= (length entries) 10) + 10 + (length entries))))) (funcall (or generator (make-generator)) - (car latest-month-entries) + index-entries :archive-date-list archive-date-list :tz tz))))