2019-10-27 16:20:04 -05:00
|
|
|
(set-env!
|
|
|
|
:source-paths #{"src"}
|
|
|
|
:resource-paths #{"content"}
|
|
|
|
:dependencies '[[perun "0.4.3-SNAPSHOT" :scope "test"]
|
|
|
|
[hiccup "1.0.5" :exclusions [org.clojure/clojure]]
|
2020-05-12 03:24:27 -05:00
|
|
|
[garden "1.3.10"]
|
2020-09-17 23:03:34 -05:00
|
|
|
[org.martinklepsch/boot-garden "1.3.2-0"]
|
2019-10-27 16:20:04 -05:00
|
|
|
[pandeiro/boot-http "0.8.3" :exclusions [org.clojure/clojure]]])
|
|
|
|
|
|
|
|
(require '[io.perun :as perun]
|
|
|
|
'[pandeiro.boot-http :refer [serve]]
|
2020-09-17 23:03:34 -05:00
|
|
|
'[org.martinklepsch.boot-garden :refer [garden]]
|
2019-10-27 16:20:04 -05:00
|
|
|
'[site.core])
|
|
|
|
|
2020-09-17 23:03:34 -05:00
|
|
|
(deftask build []
|
|
|
|
(comp (perun/pandoc)
|
|
|
|
(perun/highlight)
|
|
|
|
(sift :to-resource #{#"^img/(.*)"})
|
|
|
|
(sift :move {#"^img/(.*)" "public/img/$1"})
|
|
|
|
(sift :to-resource #{#"^extra/(.*)"})
|
|
|
|
(sift :move {#"^extra/(.*)" "public/extra/$1"})
|
|
|
|
(garden :styles-var 'site.styles/base :output-to "public/main.css")
|
2019-10-27 16:20:04 -05:00
|
|
|
(perun/render :renderer 'site.core/page)
|
2020-09-17 23:03:34 -05:00
|
|
|
(perun/sitemap :filename "sitemap.xml")
|
|
|
|
(sift :move {#"^public/(.*)" "$1"})))
|
2019-10-27 16:20:04 -05:00
|
|
|
|
2020-09-17 23:03:34 -05:00
|
|
|
(deftask dev []
|
|
|
|
(comp (watch)
|
|
|
|
(build)
|
2020-09-18 01:29:45 -05:00
|
|
|
(serve :port 8000 :resource-root "")))
|
2019-10-27 16:20:04 -05:00
|
|
|
|
2020-09-17 23:03:34 -05:00
|
|
|
(deftask publish []
|
|
|
|
(comp (build)
|
|
|
|
(target :dir #{"docs"})))
|