forked from borkdude/quickblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
44 lines (33 loc) · 1.68 KB
/
bb.edn
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
{:deps {io.github.ssjoleary/thoughts.bb {:local/root "."}}
:paths ["."]
:bbin/bin {thoughts {:ns-default thoughts.api}}
:tasks
{:requires ([babashka.fs :as fs]
[thoughts.cli :as cli])
:init (do
(def opts {:blog-title "thoughts.bb"
:blog-description "An attempt at a quieter, slower, more personal internet"
:about-link "https://github.com/ssjoleary/thoughts.bb"
:twitter-handle "thoughts.bb"})
(defn- run-command [cmd-name opts]
(apply cli/dispatch opts cmd-name *command-line-args*)))
thoughts {:doc "Run `bb thoughts help` for details."
:task (cli/dispatch opts)}
new {:doc "Put a new thought to virtual paper"
:task (run-command "new" opts)}
refresh-templates
{:doc "Update to latest templates. NOTE: this is a destructive operation, as it will overwrite any templates you have in your `:templates-dir`. You should ensure that your templates are backed up or under revision control before running this command!"
:task (run-command "refresh-templates" opts)}
render {:doc "Render blog"
:task (run-command "render" opts)}
watch {:doc "Watch posts and templates and render file changes"
:task (run-command "watch" opts)}
clean {:doc "Remove cache and output directories"
:task (run-command "clean" opts)}
publish {:doc "Publish blog"
:depends [render]
:task (shell "rsync -a --delete public/ user@yourdomain:~/blog")}
test {:doc "Run tests"
:task (apply clojure "-M:test" *command-line-args*)}
quickdoc {:doc "Re-generate API.md"
:task (shell "bb --config quickdoc.edn quickdoc")}}}