diff options
author | Jonas Smedegaard <dr@jones.dk> | 2015-10-15 13:49:50 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2015-10-15 13:49:59 +0200 |
commit | 2661aa442277ac86ad51ea9250c3c26ffb07f22c (patch) | |
tree | 391560a3847776b3b53bc609f5c6e7a6e6fa91f9 | |
parent | ca1cf5d34ca466d627edac79608f802d8afe921d (diff) |
Install non-index file as index file in subdir (for nicer URLs).
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,12 +1,14 @@ markdown := $(wildcard *.mdwn) -hypertext = $(markdown:%.mdwn=%.html) +hypertext = $(subst index/index,index,$(markdown:%.mdwn=%/index.html)) all: $(hypertext) -%.html: %.mdwn +%.html %/index.html: %.mdwn + $(if $(filter-out ./,$(dir $@)),mkdir -p $(dir $@)) pandoc -f markdown -t html -o $@ $< clean: - rm -f *.html + find -type f -name '*.html' -delete + find -type d -empty -delete .PHONY: all clean |