From 3642094d2b304c4d831979dd24da9368c8f6bd23 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Wed, 22 Aug 2012 00:44:44 -0400 Subject: [PATCH] Render post content at read time, not write time. --- src/posts.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/posts.lisp b/src/posts.lisp index 9bd3512..e32ea7e 100644 --- a/src/posts.lisp +++ b/src/posts.lisp @@ -58,7 +58,8 @@ (setf (getf args :tags) (cl-ppcre:split ", " (getf args :tags)) (getf args :format) (make-keyword (string-upcase (getf args :format)))) (apply 'make-instance 'post - (append args (list :content (read-line in nil) + (append args (list :content (render-content (read-line in nil) + (getf args :format)) :slug (slugify (getf args :title)))))))) (defun write-post (post &key prev next) @@ -68,8 +69,7 @@ (list :title (post-title post) :tags (taglinks (post-tags post)) :date (post-date post) - :content (render-content (post-content post) - (post-format post)) + :content (post-content post) :prev prev :next next))))