(declare (module (boudin page write)) (export html-head write-page)) (import (boudin page) (chicken file) (chicken pathname)) (define (write-page pg) (let ((outfile (page-output pg))) (create-directory (pathname-directory outfile) 'parents) (with-output-to-file outfile (lambda () ((o (page-writer pg) (page-template pg)) pg))))) (define html-head (make-parameter `((meta (@ (charset "utf-8"))) (meta (@ (name "viewport") (content "initial-scale=1.0"))) (link (@ (href "/style.css") (rel "stylesheet"))))))