summary refs log tree commit diff stats
path: root/boudin.scm
diff options
context:
space:
mode:
Diffstat (limited to 'boudin.scm')
-rwxr-xr-xboudin.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/boudin.scm b/boudin.scm index ac22682..51bf8d5 100755 --- a/boudin.scm +++ b/boudin.scm
@@ -289,6 +289,8 @@ boudin --- a little static site generator
289 (lambda (page) 289 (lambda (page)
290 `(html (@ (lang "en")) 290 `(html (@ (lang "en"))
291 (head (title ,(page-meta-ref page "title" "[untitled]")) 291 (head (title ,(page-meta-ref page "title" "[untitled]"))
292 (link (@ (href "../style.css") ; relative
293 (rel "stylesheet")))
292 (meta (@ (name "viewport") 294 (meta (@ (name "viewport")
293 (content "initial-scale=1.0")))) 295 (content "initial-scale=1.0"))))
294 (body ,(let ((title (page-meta-ref page "title" #f))) 296 (body ,(let ((title (page-meta-ref page "title" #f)))
@@ -299,7 +301,11 @@ boudin --- a little static site generator
299 (make-parameter 301 (make-parameter
300 (lambda pages 302 (lambda pages
301 `(html (@ (lang "en")) 303 `(html (@ (lang "en"))
302 (head (title ,(site-name))) 304 (head (title ,(site-name))
305 (link (@ (href "./style.css") ; relative
306 (rel "stylesheet")))
307 (meta (@ (name "viewport")
308 (content "initial-scale=1.0"))))
303 (body (h1 ,(site-name)) 309 (body (h1 ,(site-name))
304 (ul 310 (ul
305 ,@(map (lambda (pg) 311 ,@(map (lambda (pg)
@@ -354,7 +360,7 @@ boudin --- a little static site generator
354 360
355(define (write-page page) 361(define (write-page page)
356 (print-log "writing " (or (page-meta-ref page "title" #f) 362 (print-log "writing " (or (page-meta-ref page "title" #f)
357 (page-source-path page))) 363 (page-source-path page)))
358 (create-directory (pathname-directory (page-dest-path page)) 'parents) 364 (create-directory (pathname-directory (page-dest-path page)) 'parents)
359 (with-output-to-file (page-dest-path page) 365 (with-output-to-file (page-dest-path page)
360 (lambda () (sxml-display-as-html ((page-template) page))))) 366 (lambda () (sxml-display-as-html ((page-template) page)))))