diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1,13 +1,21 @@ -POSTS = $(filter-out $$template.html %.rendered.html,$(wildcard *.html **/*.html)) -RENDERED = $(POSTS:.html=.rendered.html) +MDPOSTS := $(wildcard *.md **/*.md) +MDHTML := $(MDPOSTS:.md=.html) + +POSTS := $(filter-out $$template.html %.rendered.html $(MDHTML),$(wildcard *.html **/*.html)) +POSTS += $(MDHTML) + +RENDERED := $(POSTS:.html=.rendered.html) .PHONY: all clean all: $(RENDERED) clean: - rm -f $(RENDERED) + rm -f $(RENDERED) $(MDHTML) + +$(MDHTML): %.html: %.md + cmark-gfm --unsafe <'$<' >'$@' -%.rendered.html: %.html $$template.html .tools/render.sh +$(RENDERED): %.rendered.html: %.html $$template.html .tools/render.sh .tools/render.sh '$<' |