-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
31 lines (27 loc) · 749 Bytes
/
Copy pathmakefile
File metadata and controls
31 lines (27 loc) · 749 Bytes
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
# zola version: 0.22
rebuild:
@echo "Cleaning up"
@rm -rf public/*
@make build
run:
@zola serve --drafts
build:
@echo "Building"
@zola build
publish:
@make rebuild
@echo "Publishing"
@git log --oneline | head -n1 | sed -r 's/^[a-zA-Z0-9]+ //g' > public/last_commit
@git checkout main
@git pull --rebase
@rm -rf *.html *.xml 2* about* page tags series stylesheets images avatar javascripts resources content
@for i in $(find . -path ./public -prune -o -name index.html); do rm -rf $(dirname $i); done
@cp -R public/* .
@rm -rf public
@git add -A .
@git commit -m "Last commit from source branch: '`cat last_commit`'"
@rm -rf last_commit
@git push
@git checkout -
drafts:
@egrep "draft.*true" content/posts/ -rl | grep "\.md"