~dricottone/blog

ref: fcce914f043b4bbd45b0cd75e4a6cf38549c326e blog/Makefile -rw-r--r-- 1.6 KiB
fcce914fDominic Ricottone Spelling fixes 9 months ago
                                                                                
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
49
clean:
	rm -rf public resources themes
	rm -rf scripts/cv.aux scripts/cv.log scripts/cv.out
	rm -rf content/posts/*.bak
	rm -rf layouts/partials/bsky.html
	rm -rf layouts/partials/lastfm.html
	rm -rf layouts/partials/openring.html

scripts/cv.tex: content/cv.md
	sed content/cv.md \
		-e 's/南山大学/\\begin{CJK}{UTF8}{min}&\\end{CJK}/' \
		| scripts/cv_tex.awk > scripts/cv.tex

static/files/dominic-ricottone.pdf: scripts/cv.tex
	mkdir -p static/files
	cd scripts && pdflatex cv.tex
	mv scripts/cv.pdf static/files/dominic-ricottone.pdf
	rm -rf scripts/cv.aux scripts/cv.log scripts/cv.out

static/files/dominic-ricottone.html: content/cv.md
	mkdir -p static/files
	cat content/cv.md \
		| scripts/cv_html.awk > static/files/dominic-ricottone.html

layouts/partials/bsky.html:
	scripts/bsky.bash > layouts/partials/bsky.html

layouts/partials/lastfm.html:
	scripts/lastfm.sh > layouts/partials/lastfm.html

layouts/partials/openring.html:
	scripts/openring.sh > layouts/partials/openring.html

PREGEN_HTML=static/files/dominic-ricottone.pdf static/files/dominic-ricottone.html layouts/partials/bsky.html layouts/partials/lastfm.html layouts/partials/openring.html

build: clean $(PREGEN_HTML)
	hugo

check:
	for f in content/posts/*.md; do aspell --check $$f; done

dev: $(PREGEN_HTML)
	hugo --buildDrafts --baseURL https://dev.intra.dominic-ricottone.com
	rsync --recursive --links --compress --delete public/ alarm@arch3.intra.dominic-ricottone.com:/var/deploy/web/development

publish: build
	rsync --recursive --links --compress --delete --chown=admin:admin public/ admin-aws3:/var/deploy/web/blog/

.PHONY: clean build check dev publish