From 63a9ef331f5761410255e5f0f2177111c719e3ac Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sun, 15 Mar 2020 17:16:00 +0100 Subject: Generate indices for folders without READMEs --- repo/www/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'repo/www/Makefile') diff --git a/repo/www/Makefile b/repo/www/Makefile index 8f5bb2a..e7d5184 100644 --- a/repo/www/Makefile +++ b/repo/www/Makefile @@ -18,14 +18,19 @@ include $(dependencies) $(dependencies): make-deps.py $(text_folders) python3 $< "$(TEXT_FILES)" $(OUT_DIR) -site: $(pages) +site: $(pages) $(autoindices) $(page_folders): mkdir -p $@ -%.html: +$(pages): pandoc -s $< -o $@ +# ⚠ When tweaking this rule, check whether it still works for the +# top-level index.html, i.e. when there is no top-level README. +$(autoindices): $(OUT_DIR)%/index.html: $(TOP_DIR)% make-index.py | $(OUT_DIR)% + python3 make-index.py "$(TEXT_FILES)" "$(*:/%=%)" $(OUT_DIR) + clean: -rm $(dependencies) -rm -r $(OUT_DIR) -- cgit v1.2.3