summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--haunt/site.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/haunt/site.scm b/haunt/site.scm
index 05d3f56..52796e4 100644
--- a/haunt/site.scm
+++ b/haunt/site.scm
@@ -95,10 +95,12 @@ BUILDERS: A list of procedures for building pages from posts"
(define (build-site site)
"Build SITE in the appropriate build directory."
- (let ((posts (read-posts (site-posts-directory site)
- (site-post-filter site)
- (site-readers site)
- (site-default-metadata site)))
+ (let ((posts (if (file-exists? (site-posts-directory site))
+ (read-posts (site-posts-directory site)
+ (site-post-filter site)
+ (site-readers site)
+ (site-default-metadata site))
+ '()))
(build-dir (absolute-file-name (site-build-directory site))))
(when (file-exists? build-dir)
(delete-file-recursively build-dir)