forked from borkdude/quickblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
48 lines (36 loc) · 1.79 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
45
46
47
48
{:deps {io.github.borkdude/quickblog {:local/root "."}}
:paths ["."]
:bbin/bin {quickblog {:ns-default quickblog.api}}
:tasks
{:requires ([babashka.fs :as fs]
[quickblog.cli :as cli])
:init (do
(def opts {:blog-title "REPL adventures"
:blog-description "A blog about blogging quickly"
:about-link "https://github.com/borkdude/quickblog"
:twitter-handle "quickblog"})
(defn- run-command [cmd-name opts]
(apply cli/dispatch opts cmd-name *command-line-args*)))
quickblog {:doc "Start blogging quickly! Run `bb quickblog help` for details."
:task (cli/dispatch opts)}
new {:doc "Create new blog article"
:task (run-command "new" opts)}
migrate {:doc "Migrate away from posts.edn to metadata in post files"
:task (run-command "migrate" 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")}
}}