From a4401b352150205d2f6ee7e3dc99c1145e399c60 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 29 Apr 2020 00:40:14 +0200 Subject: Fix links to internal pages Replace .md/.org extension with .html. The output of "make" is now ugly as sin. --- repo/www/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'repo/www/Makefile') diff --git a/repo/www/Makefile b/repo/www/Makefile index cdc7ee2..db656f2 100644 --- a/repo/www/Makefile +++ b/repo/www/Makefile @@ -43,7 +43,10 @@ $(html_folders) $(cache): $(pages) $(subindices): $(title) $(pages): $(OUT_DIR)/%.html: - pandoc -s $< -o $@ -T "$$(cat $(title))" -M title="$*" + TEXT_FILES="$(TEXT_FILES)" \ + pandoc -s $< -o $@ \ + -T "$$(cat $(title))" -M title="$*" \ + --lua-filter convert-internal-links.lua top_index = $(OUT_DIR)/index.html subindices = $(filter-out $(top_index),$(indices)) @@ -54,6 +57,7 @@ $(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: + TEXT_FILES="$(TEXT_FILES)" \ ./generate-index.py $(index_options) $(site_tree) "$(patsubst %/,%,$*)" $@ clean: -- cgit v1.2.3