-
Notifications
You must be signed in to change notification settings - Fork 1
/
haunt.scm
38 lines (33 loc) · 1.08 KB
/
haunt.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(use-modules (haunt artifact)
(haunt builder assets)
(haunt html)
(haunt site)
(commonmark))
(define (base-template body)
`((doctype html)
(head
(meta (@ (charset "utf-8")))
(meta (@ (name "viewport")
(content "width=device-width, initial-scale=1")))
(title "Awesome Haunt")
;; css
(link (@ (rel "stylesheet")
(href "static/css/terminal.min.css")))
(body (@ (class "terminal"))
(div (@ (class "container"))
,body)))))
(define index-sxml
(call-with-input-file "readme.md"
(lambda (port)
(commonmark->sxml port))))
(define (index-page site posts)
(serialized-artifact "index.html"
(base-template index-sxml)
sxml->html))
(site #:title "awesome.haunt.page"
#:domain "awesome.haunt.page"
#:default-metadata
'((author . "filip lajszczak")
(email . "filip@lajszczak.dev"))
#:readers (list)
#:builders (list index-page (static-directory "static")))