site: Don't crash if there is no posts directory.
* haunt/site.scm (build-site): Test for the existence of posts directory.
This commit is contained in:
parent
49c0dec2e0
commit
ce95359aab
|
@ -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)
|
||||
(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)))
|
||||
(site-default-metadata site))
|
||||
'()))
|
||||
(build-dir (absolute-file-name (site-build-directory site))))
|
||||
(when (file-exists? build-dir)
|
||||
(delete-file-recursively build-dir)
|
||||
|
|
Loading…
Reference in New Issue