From a7d02ecabb6cf9add1fc7be60dc19bd7d9c7e75f Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Mon, 10 Jun 2019 22:21:23 +0200 Subject: [PATCH] Use web root for navigation links --- Makefile | 1 + Tuprules.tup | 2 +- templates/pandoc.html | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c8bba28..164183d 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ tup: tup build preview: tup + rm -rf preview cp -r build preview rm -f preview/tup.config diff --git a/Tuprules.tup b/Tuprules.tup index a8f16db..97df020 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -1,9 +1,9 @@ &root = . !pandoc = | &(root)/templates/footer.html |> pandoc --from markdown --to html \ --template=&(root)/templates/pandoc.html \ + --variable=webRoot:&(root) \ --css &(root)/css/default.css \ --include-in-header=&(root)/templates/header.html \ - --include-before-body=&(root)/templates/nav.html \ --include-after-body=&(root)/templates/footer.html \ %f --output=%o \ |> %B.html diff --git a/templates/pandoc.html b/templates/pandoc.html index 9816fcf..1dc9267 100644 --- a/templates/pandoc.html +++ b/templates/pandoc.html @@ -45,6 +45,14 @@ $endfor$ $for(include-before)$ $include-before$ $endfor$ + + + + $if(title)$

$title$