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 ./