From 72ed1b208d4fd148ea45e56f1d2b2378790f7d7d Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 16 Apr 2020 23:35:30 +0200 Subject: Touch up web page titles Still a few wrinkles to iron out, e.g. the toplevel page's . --- repo/www/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'repo/www/Makefile') 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) -- cgit v1.2.3