summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 1b4cb10..cfb1423 100644
--- a/Makefile
+++ b/Makefile
@@ -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 '$<'