summaryrefslogtreecommitdiff
path: root/repo/www/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'repo/www/Makefile')
-rw-r--r--repo/www/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index fdc0112..3c5f813 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -1,6 +1,9 @@
TOP_DIR = ../..
OUT_DIR = $(TOP_DIR)/public
TEXT_FILES = md org
+# make does not care about unpaired single quotes (nor double quotes
+# for that matter) but Emacs does. Shell out.
+TITLE = $(shell echo "peniblec's memleaks")
dirname = $(patsubst %/,%,$(dir $(1)))
dirnames = $(sort $(call dirname,$(1)))
@@ -31,13 +34,13 @@ site: $(pages) $(indices)
$(call dirnames,$(pages) $(indices)):
mkdir -p $@
-$(pages):
- pandoc -s $< -o $@
+$(pages): $(OUT_DIR)/%.html:
+ pandoc -s $< -o $@ -T "$(TITLE)" -M title="$*"
# ⚠ When tweaking this rule, check whether it still works for the
# top-level index.html.
$(indices): $(OUT_DIR)/%index.html:
- ./generate-index.py $(site_tree) "$(patsubst %/,%,$*)" $@
+ ./generate-index.py $(site_tree) "$(TITLE)" "$(patsubst %/,%,$*)" $@
clean:
-rm $(dependencies)