summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0fcd30a..b907184 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+INDEX =
+INDEX_SCRIPT = s|href="\([^:]*\)/"|href="\1/$(INDEX)"|g
DOCUMENT_BASE =
MEDIA_BASE =
SSIFLAGS = -D DOCUMENT_BASE=$(DOCUMENT_BASE) -D MEDIA_BASE=$(MEDIA_BASE)
@@ -29,12 +31,12 @@ objs = $(srcs:.mdwn=.html)
all: $(objs)
local:
- $(MAKE) DOCUMENT_BASE=$(PWD) MEDIA_BASE=$(PWD) all
+ $(MAKE) INDEX=index.html DOCUMENT_BASE=$(PWD) MEDIA_BASE=$(PWD) all
$(objs): Makefile includes/header.html includes/footer.html
.mdwn.html:
- markdown $< | ssic -o $@ $(SSIFLAGS) -
+ markdown $< | ssic -o - $(SSIFLAGS) - | sed '$(INDEX_SCRIPT)' >$@
clean:
rm -f $(objs)