From 88bcc76da4f5a8a614e9372c407652129ab5758e Mon Sep 17 00:00:00 2001 From: Jose Santos Date: Sat, 1 Sep 2012 00:39:29 +0100 Subject: [PATCH 1/2] Allow COMPILE-BLOG to actually remove staging. Prevent RENDER-FEEDS from breaking for less than 10 posts. --- src/coleslaw.lisp | 2 +- src/feeds.lisp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coleslaw.lisp b/src/coleslaw.lisp index dcaafc6..a6e84ad 100644 --- a/src/coleslaw.lisp +++ b/src/coleslaw.lisp @@ -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*)) diff --git a/src/feeds.lisp b/src/feeds.lisp index 7d785f7..5aacc59 100644 --- a/src/feeds.lisp +++ b/src/feeds.lisp @@ -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) From 1010cccf8566757bb8dc134f84a3eeeea871bc78 Mon Sep 17 00:00:00 2001 From: Jose Santos Date: Sat, 1 Sep 2012 00:42:01 +0100 Subject: [PATCH 2/2] Order does matter. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fbd31a..d74fde9 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ Coleslaw expects post files to be formatted as follows: ``` ;;;;; title: foo -date: yyyy-mm-dd timestamp tags: bar, baz +date: yyyy-mm-dd timestamp format: html (for raw html) or md (for markdown) ;;;;; your post