-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (29 loc) · 780 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
SHELL := /bin/bash
MDS=$(wildcard site/*/*.md)
HTMLS=$(patsubst site/%.md,output/%.html, $(MDS))
.PHONY: all
all: $(HTMLS) output/index.html css js metadata assets
echo $(HTMLS)
output:
mkdir output
output/index.html: site/index.md
pandoc site/index.md -o output/index.html --template site/templates/index.html
%.html: output
mkdir -p $(dir $@)
pandoc $(patsubst output/%.html,site/%.md,$@) -o "$@" --template site/templates/template.html
css:
cp site/style.css output/
js:
cp site/index.js output/
metadata:
cp -r site/metadata output/
assets:
cp -r site/assets output/
watch:
ag -l | entr sh -c 'make clean && make'
serve:
browser-sync start --server './output' --files "site/**/*"
clean:
rm -rf output/*
update_binaries:
cd post_template; cargo build