-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 982 Bytes
/
Makefile
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
scss := $(wildcard src/css/**/*.scss)
css := $(patsubst src/%,static/%,$(scss:scss=css))
CHROME = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
.PHONY: css hugo
static: css hugo public/resume/resume.pdf
css: $(css)
static/%.css: src/%.scss
sassc --style compressed $< $@
hugo:
@hugo
public/resume/resume.pdf: $(css) content/resume.md
$(CHROME) public/resume/index.html
echo wkhtmltopdf \
-s Letter \
--print-media-type \
--footer-center "[title]" \
--footer-left "[isodate]" \
--footer-right "Page [page]/[toPage]" \
--footer-font-size 6 \
--footer-font-name "Cardo" \
--footer-spacing 19 \
--margin-bottom 25mm \
--no-outline \
--quiet \
public/resume/index.html public/resume/resume.pdf
watch: watchsass watchhugo
watchsass:
sass --watch src/css:static/css
watchhugo:
hugo server -D --watch
.ONESHELL:
deploy: static
cd public; \
git add -A; \
git commit -m "rebuilding site $$(date)";\
git push origin HEAD:gh-pages