haunt.scm 1.25 KB
Newer Older
Philip Kaludercic's avatar
Philip Kaludercic committed
1
2
3
4
5
6
7
(use-modules (haunt post)
			 (haunt page)
			 (haunt site)
			 (haunt asset)
			 (haunt html)
			 (haunt builder blog)
			 (haunt builder atom)
Philip Kaludercic's avatar
Philip Kaludercic committed
8
			 (haunt builder rss)
Philip Kaludercic's avatar
Philip Kaludercic committed
9
10
11
12
			 (haunt builder assets)
			 (haunt reader commonmark)
			 (local micronews paged-blog)
			 (local theme)
13
			 (local common)
Philip Kaludercic's avatar
Philip Kaludercic committed
14
15
			 (local pages)
			 (srfi srfi-19))
Philip Kaludercic's avatar
Philip Kaludercic committed
16
17
18
19
20
21
22
23

(define* (static-page name title sxml #:key (theme local-site-theme))
  (lambda (site posts)
	(list
	 (make-page (string-append name ".html")
				((theme-layout theme) site title sxml)
				sxml->html))))

Philip Kaludercic's avatar
Philip Kaludercic committed
24
(define (local-post-slug post)
25
  (string-append (date->string (post-date post) "~Y/~m/")
Philip Kaludercic's avatar
Philip Kaludercic committed
26
27
				 (basename (post-file-name post) ".md")))

Philip Kaludercic's avatar
Philip Kaludercic committed
28
29
30
(site #:title "#faui2k17"
      #:domain "faui2k17.de"
      #:readers (list commonmark-reader)
Philip Kaludercic's avatar
Philip Kaludercic committed
31
	  #:make-slug local-post-slug
Philip Kaludercic's avatar
Philip Kaludercic committed
32
33
      #:builders (list (paged-blog #:theme local-site-theme
								   #:prefix "post")
Philip Kaludercic's avatar
Philip Kaludercic committed
34
35
36
37
					   (atom-feed #:blog-prefix "post")
					   (atom-feeds-by-tag #:prefix "tags"
										  #:blog-prefix "post")
					   (rss-feed #:blog-prefix "post")
Philip Kaludercic's avatar
Philip Kaludercic committed
38
39
40
41
42
43
44
					   (static-page "meta" "Meta"
									%meta-page)
					   (static-page "irc" "IRC"
									%irc-page)
					   (static-page "whatsapp" "WhatsApp Links"
									%whatsapp-page)
					   (static-directory "static" "static")))