-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.boot
42 lines (38 loc) · 1.11 KB
/
build.boot
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
(set-env!
:project 'alejandro.run
:version "0.1.0"
:source-paths #{"src"}
:resource-paths #{"resources"}
:dependencies '[[perun "0.4.3-SNAPSHOT" :scope "test"]
[hiccup "1.0.5" :exclusions [org.clojure/clojure]]
[pandeiro/boot-http "0.8.3" :exclusions [org.clojure/clojure]]
[deraen/boot-sass "0.5.1"]])
(require '[io.perun :as perun]
'[deraen.boot-sass :refer [sass]]
'[alejandro.run.web :as web]
'[pandeiro.boot-http :refer [serve]])
(defn post?
[{:keys [type]}]
(= "post" type))
(deftask build
[]
(comp
(perun/global-metadata)
(sass :output-style :compressed)
(perun/markdown)
(perun/draft)
(perun/ttr)
(perun/render :renderer 'alejandro.run.web/post
:filterer post?)
(perun/collection :renderer 'alejandro.run.web/blog
:filterer post?
:page "index.html")
(perun/tags :renderer 'alejandro.run.web/tag
:filterer post?)
(target)
(notify)))
(deftask dev
[]
(comp (watch)
(build)
(serve :resource-root "public")))