index.html: head footer index.awk
	newfirst=`asort/asort 20*/*/*.md | awk '{ a[NR] = $$1 } END{ for(i=length(a); i>1; i--) print a[i]}'` && \
	awk -f index.awk $$newfirst | cat head /dev/stdin footer > index.html

.SUFFIXES: .md .html
.md.html: head articlehead articlefooter footer
	lowdown $< | cat head articlehead /dev/stdin articlefooter footer > $@

clean:
	rm -f *.html 20*/*/*.html
