From ca36f290b4905bed1796ee967c592fb8989b71f1 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Thu, 21 Nov 2024 16:26:54 +0100 Subject: [PATCH] fix variant path for footer generated file --- Tuprules.tup | 13 +++++++------ templates/Tupfile | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Tuprules.tup b/Tuprules.tup index 744a6ce..3712e6e 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -1,16 +1,17 @@ &root = . -&build_root = build +&tmpl_dir = ./templates +&gen_tmpl_dir = ./build/templates HTML_TEMPLATE = main.html -!html = | &(root)/templates/footer.html \ +!html = | &(tmpl_dir)/ \ |> ^b html %f^ \ pandoc --from markdown --to html \ - --template=&(root)/templates/$(HTML_TEMPLATE) \ + --template=&(tmpl_dir)/$(HTML_TEMPLATE) \ + --include-in-header=&(tmpl_dir)/header.html \ + --include-before-body=&(tmpl_dir)/nav.html \ --css &(root)/css/style.css \ - --include-in-header=&(root)/templates/header.html \ - --include-before-body=&(root)/templates/nav.html \ - --include-after-body=&(build_root)/templates/footer.html \ + --include-after-body=&(gen_tmpl_dir)/footer.html \ %f | sed 's|%%webRoot%%|&(root)|g' > %o \ |> %B.html diff --git a/templates/Tupfile b/templates/Tupfile index 45e0fb0..f179092 100644 --- a/templates/Tupfile +++ b/templates/Tupfile @@ -1 +1 @@ -: |> ./generate_footer.sh > %o |> footer.html +: |> ./generate_footer.sh > %o |> footer.html ./