aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: d35650368b34bb1777e2f18ea5b8dfd07d5d98d3 (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
25
26
27
28
# this fucking sucks lol

all: build

serve:
	xdg-open http://localhost:8000/
	python3 -m http.server -d public/

watch:
	find src/ templates/ -type f | entr make build

build: # shit breaks when index.org doesnt exist idk why
	[ -f src/blog/index.org ] || touch src/blog/index.org
	@mkdir -p public/
	emacs -Q --script build-site.el

compress: build # for gzip-static, check the obsd httpd.conf(5) man page
	find public/ -type f \( -name "*.html" -o -name "*.css" -o -name "*.xml" \) \
	-exec gzip -k {} \;

publish: compress build
	rsync -rcvP --delete public/ \
	lemurianmage@slimegirl.nexus:/var/www/htdocs/slimegirl.nexus

clean:
	rm -r public/

.PHONY: serve watch build compress publish clean