-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 687 Bytes
/
Makefile
File metadata and controls
32 lines (24 loc) · 687 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
32
.POSIX:
.PHONY: render clean
# Locations
INPUT = website
OUTPUT = _website
POSTDIR = $(INPUT)/posts
POSTS = $(wildcard $(POSTDIR)/*.index.html.pm)
# External tool configurations
TIDY_CONFIG = tidy.config
TIDY = tidy -modify -config $(TIDY_CONFIG)
default: render index.html posts/index.html
render:
raco pollen render -r $(INPUT)
publish:
raco pollen publish $(INPUT) $(OUTPUT)
rm $(OUTPUT)/template.html
$(TIDY) $(OUTPUT)/*.html || true
$(TIDY) $(OUTPUT)/$(POSTDIR)/*.html || true
clean:
raco pollen reset
index.html: $(INPUT)/index.html.pm $(POSTS)
raco pollen render -f $(INPUT)/index.html.pm
posts/index.html: $(POSTS)
raco pollen render -f $(POSTDIR)/index.html.pm