Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
659a59bd99 | ||
|
|
69a6f9c3ff |
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user