about summary refs log tree commit diff stats
path: root/src/wikme.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/wikme.scm')
-rw-r--r--src/wikme.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wikme.scm b/src/wikme.scm index 752aa8b..14167d6 100644 --- a/src/wikme.scm +++ b/src/wikme.scm
@@ -50,12 +50,14 @@
50 (make-wiki base-url 50 (make-wiki base-url
51 directory 51 directory
52 destination-directory 52 destination-directory
53 page-template
53 file-transformers 54 file-transformers
54 transformers 55 transformers
55 '())) 56 '()))
56 57
57 (set! wiki-pages (map (lambda (f) (file->page f wiki)) 58 (set! (wiki-pages wiki)
58 (glob (make-pathname directory "*.md")))) 59 (map (lambda (f) (file->page f wiki))
60 (glob (make-pathname directory "*.md"))))
59 61
60 wiki) 62 wiki)
61 63
@@ -264,8 +266,10 @@
264 266
265(define (render-wiki wiki) 267(define (render-wiki wiki)
266 ;;; Render the files in WIKI to disk. 268 ;;; Render the files in WIKI to disk.
269 (create-directory (wiki-destination-dir wiki) #:parents)
267 (for-each (lambda (page) 270 (for-each (lambda (page)
268 (with-output-to-file (page-destination page) 271 (with-output-to-file (page-destination page)
269 (lambda () 272 (lambda ()
270 (write-string (render-page (wiki-page-template wiki) page))))) 273 (write-string
274 (render-page (wiki-page-template wiki) page)))))
271 (wiki-pages wiki))) 275 (wiki-pages wiki)))