blob: e217e738c54e5d0772666aada039a3eb81bc6189 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env bash
playbook_add() {
git clone https://git.tyil.nl/blog "$(config www.blog.path)"
playbook_sync
}
playbook_sync() {
if [[ $BASHTARD_COMMAND != "add" ]]
then
git -C "$(config www.blog.path)" pull origin "$(config www.blog.branch)"
fi
chgdir "$(config www.blog.path)"
hugo -D # This will generate all the draft content
hugo # And this will generate the actual live blog, but won't remove the draft content
}
playbook_del() {
rm -fr -- "$(config www.blog.path)"
pkg uninstall hugo
}
|