summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2021-08-15 23:10:16 +0200
committerTom Smeding <tom@tomsmeding.com>2021-08-15 23:12:35 +0200
commit32617e00f49c2259bf99767c1f658691bc7fa20e (patch)
tree5fee1fb5aa016053046507fc26761e60d85934a6 /Makefile
parentb09bcc44c74b7cd2cccf786fde9e0211e54233ec (diff)
Add haskell/composition post
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 '$<'