diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-04-25 23:51:27 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-04-25 23:51:27 +0200 |
| commit | c6f09513154c18076ec4d1150cabe0a22d83314a (patch) | |
| tree | 00a5e9cb564f74720a092044fd75a8ef1db23775 /repo/www/Makefile | |
| parent | 8692dba921531783b9204a9323db2aba640fe978 (diff) | |
| download | memory-leaks-c6f09513154c18076ec4d1150cabe0a22d83314a.tar.xz | |
Remove redundant title prefix on top-level index
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) |
