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