diff options
Diffstat (limited to 'repo/www/Makefile')
| -rw-r--r-- | repo/www/Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
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) |
