Compare commits

2 Commits

Author SHA1 Message Date
thintz
659a59bd99 Add js func. 2014-02-13 15:20:10 -08:00
thintz
69a6f9c3ff Change compile to compile-site and add clean param. 2013-10-25 10:45:31 -07:00

View File

@@ -7,12 +7,12 @@
sxml->html
; helper functions
markdown-file->sxml link link-list css
markdown-file->sxml link link-list css js
; core functions
add-page! delete-page! add-css! delete-css!
add-file-resource! delete-file-resource!
compile
compile-site
)
(import chicken scheme files srfi-1 extras ports irregex)
@@ -63,6 +63,9 @@
(define (css path)
`(link (@ (rel "stylesheet") (href ,(++ (link-root) path)))))
(define (js path)
`(script (@ (type "text/javascript") (src ,(++ (link-root) path)))))
(define (add-page! path body)
(hash-table-set! *pages* path body))
@@ -110,8 +113,8 @@
(file-copy (++ (res-dir) "/" p) path-out)))
*file-resources*))
(define (compile)
(and (directory? (out-dir)) (delete-directory (out-dir) #t))
(define (compile-site #!key (clean #t))
(when clean (and (directory? (out-dir)) (delete-directory (out-dir) #t)))
(output-pages)
(output-stylesheets)
(copy-file-resources))