Minor bugfixes and RENDER-POSTS cleanup.
This commit is contained in:
parent
5161a33c6c
commit
27e8ed0590
3 changed files with 5 additions and 8 deletions
|
@ -5,6 +5,6 @@ LISP=sbcl
|
|||
|
||||
git clone $GIT_REPO $TMP_GIT_CLONE
|
||||
# Only ccl and sbcl support the eval switch, other lisps require a patch here
|
||||
$LISP --eval "(ql:quickload 'coleslaw)" --eval "(coleslaw:main)" --eval "(trival-shell:exit)"
|
||||
$LISP --eval "(ql:quickload 'coleslaw)" --eval "(coleslaw:main)" --eval "(trivial-shell:exit)"
|
||||
rm -Rf $TMP_GIT_CLONE
|
||||
exit
|
||||
|
|
|
@ -66,5 +66,5 @@
|
|||
(dotimes (i (ceiling (length posts) 10))
|
||||
(render-page (index-by-n i posts) nil
|
||||
:prev (and (plusp i) i)
|
||||
:next (and (< (* i 10) (length posts)) (+ 2 i)))))
|
||||
:next (and (< (* (1+ i) 10) (length posts)) (+ 2 i)))))
|
||||
(update-symlink "index.html" "1.html"))
|
||||
|
|
|
@ -30,12 +30,9 @@
|
|||
|
||||
(defun render-posts ()
|
||||
"Iterate through the files in the repo to render+write the posts out to disk."
|
||||
(loop with posts = (sort (hash-table-values *posts*) #'string< :key #'post-date)
|
||||
for i from 1 upto (length posts)
|
||||
for prev = nil then post
|
||||
for post = (nth (1- i) posts)
|
||||
for next = (nth i posts)
|
||||
do (render-page post nil :prev prev :next next)))
|
||||
(loop for (prev post next) on (append '(nil) (sort (hash-table-values *posts*)
|
||||
#'string< :key #'post-date))
|
||||
while post do (render-page post nil :prev prev :next next)))
|
||||
|
||||
(defgeneric render-content (text format)
|
||||
(:documentation "Compile TEXT from the given FORMAT to HTML for display.")
|
||||
|
|
Loading…
Add table
Reference in a new issue