responsive!

This commit is contained in:
2017-03-31 16:33:27 +02:00
parent 4d6f5fccfb
commit 307bf972bc
2 changed files with 31 additions and 1 deletions

View File

@@ -15,10 +15,15 @@
(define (from-path file)
(regex:sub r/.md$/ "" (list:last (string:split file "/"))))
(define (treat str)
(regex:gsub r/<br \/>/ "</p><p>" (regex:gsub r/<p>/ "<p class='paragraph'>" str)))
(define (render targets)
(let* ((strs (map read-contents targets))
(args (make-hash
"poems" (map (curry pandoc:convert "markdown" "html") strs))))
"poems" (map (compose treat
(curry pandoc:convert "markdown" "html"))
strs))))
(with-output-file "index.html"
(curry write (mustache:template tpl args)))))