blob: 2b83cdb1ed3a49ebf97e5abaae12b18875c9dbcc (
plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
(use-modules
(haunt builder assets)
(haunt builder atom)
(haunt builder flat-pages)
(haunt builder blog)
(haunt artifact)
(haunt reader)
(haunt reader commonmark)
(haunt site)
(haunt post)
(haunt html)
(theme)
(reader))
(define post-prefix "post")
(define (posts/reverse-file-name posts)
"Returns POSTS sorted in reverse file name order."
(sort posts
(lambda (a b)
(string>? (post-file-name a) (post-file-name b)))))
(define (filter-now posts)
(posts/reverse-file-name
(filter (lambda (p) (member "now" (post-tags p))) posts)))
(define (filter-not-now posts)
(posts/reverse-chronological
(filter (lambda (p) (not (member "now" (post-tags p)))) posts)))
(define posts-other
`(("Blog" "blog/index.html" ,filter-not-now)))
(define posts-now
`(("Now" "now/index.html" ,filter-now)))
(site #:title "hwebs"
#:domain "hwebs.info"
#:default-metadata
'((author . "Henry J. Webster")
(email . "hwebs@hwebs.info"))
#:readers (list commonmark-reader xml-reader)
#:builders (list (blog #:theme hwebs-theme-blog
#:collections posts-other
#:prefix "blog"
#:post-prefix post-prefix)
(blog #:theme hwebs-theme-now
#:collections posts-now
#:prefix "now")
(atom-feed #:file-name "blog/feed.xml"
#:filter filter-not-now
#:blog-prefix "/blog/post")
(flat-pages #:template flat-page-template)
(static-directory "images")
(lambda (site posts)
(list (verbatim-artifact "style.css" "style.css")))))
|