Allow COMPILE-BLOG to actually remove staging.
Prevent RENDER-FEEDS from breaking for less than 10 posts.
This commit is contained in:
parent
221cc111c1
commit
88bcc76da4
2 changed files with 3 additions and 2 deletions
|
@ -25,7 +25,7 @@ If RAW is non-nil, write the content without wrapping it in the base template."
|
|||
"Compile the blog to a STAGING directory as specified in .coleslawrc."
|
||||
; TODO: More incremental compilation? Don't regen whole blog unnecessarily.
|
||||
(when (probe-file staging)
|
||||
(cl-fad:delete-directory-and-files staging))
|
||||
(run-program "rm -R ~a" staging))
|
||||
(ensure-directories-exist staging)
|
||||
(with-current-directory staging
|
||||
(dolist (dir (list (app-path "themes/~a/css" (theme *config*))
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
(defun render-feeds ()
|
||||
"Render and write the feed for the site."
|
||||
(let* ((posts (subseq (by-date (hash-table-values *posts*)) 0 10))
|
||||
(let* ((bydate (by-date (hash-table-values *posts*)))
|
||||
(posts (subseq bydate 0 (when (>= (length bydate) 10) 10)))
|
||||
(content (loop for post in posts
|
||||
collect (list :title (post-title post)
|
||||
:url (post-url post)
|
||||
|
|
Loading…
Add table
Reference in a new issue