|
@@ -81,3 +81,12 @@ compile and deploy the blog."
|
81
|
81
|
(compile-theme (theme *config*))
|
82
|
82
|
(compile-blog (staging *config*))
|
83
|
83
|
(deploy (staging *config*))))
|
|
84
|
+
|
|
85
|
+(defun preview (path &optional (content-type 'post))
|
|
86
|
+ "Render the content at PATH and save it to ~/tmp.html, loading the
|
|
87
|
+user's config and theme if necessary."
|
|
88
|
+ (unless *config*
|
|
89
|
+ (load-config nil)
|
|
90
|
+ (compile-theme (theme *config*)))
|
|
91
|
+ (let ((object (construct content-type (read-content path))))
|
|
92
|
+ (write-page "~/tmp.html" (render-page object))))
|