summaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
blob: 7df1698f2c481b726247a5256cee53dca38632ab (plain) (blame)
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
POSTS_MD  = $(wildcard posts/*.md)
POSTS_XML = $(wildcard posts/*.xml)
POSTS_HTML = $(POSTS_MD:.md=.html) $(POSTS_XML:.xml=.html)

SCSS = $(wildcard scss/_*.scss)

site: index.html atom.xml style.css man.css

index.html: templates/index.xml $(POSTS_HTML)
	sblg -o $@ -t templates/index.xml $(POSTS_HTML)

atom.xml: templates/atom.xml $(POSTS_HTML)
	sblg -ao $@ -t templates/atom.xml $(POSTS_HTML)

%.html: %.xml templates/post.xml
	sblg -co $@ -t templates/post.xml $<

%.xml: %.md util/mdconv.sh
	sh util/mdconv.sh $< >$@

%.css: scss/%.scss $(SCSS)
	sassc -t expanded $< >$@

clean:
	rm -f posts/*.html index.html atom.xml style.css man.css

deploy:
	@rsync -avhR $(POSTS_HTML) posts/img fonts index.html style.css man.css logo.svg atom.xml coleridge:www/oriole.systems/

.PHONY: clean deploy site