From c6f09513154c18076ec4d1150cabe0a22d83314a Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sat, 25 Apr 2020 23:51:27 +0200 Subject: Remove redundant title prefix on top-level index --- repo/www/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'repo/www/Makefile') diff --git a/repo/www/Makefile b/repo/www/Makefile index c236936..cdc7ee2 100644 --- a/repo/www/Makefile +++ b/repo/www/Makefile @@ -40,15 +40,21 @@ html_folders = $(call dirnames,$(pages) $(indices)) $(html_folders) $(cache): mkdir -p $@ -$(pages) $(indices): $(title) +$(pages) $(subindices): $(title) $(pages): $(OUT_DIR)/%.html: pandoc -s $< -o $@ -T "$$(cat $(title))" -M title="$*" +top_index = $(OUT_DIR)/index.html +subindices = $(filter-out $(top_index),$(indices)) + +$(top_index): index_options = +$(subindices): index_options = --site-title="$$(cat $(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) "$$(cat $(title))" "$(patsubst %/,%,$*)" $@ + ./generate-index.py $(index_options) $(site_tree) "$(patsubst %/,%,$*)" $@ clean: -rm $(dependencies) -- cgit v1.2.3