Use web root for navigation links

This commit is contained in:
Fabien Freling 2019-06-10 22:21:23 +02:00
parent dfd1ce60f4
commit a7d02ecabb
3 changed files with 10 additions and 1 deletions

View file

@ -10,6 +10,7 @@ tup:
tup build
preview: tup
rm -rf preview
cp -r build preview
rm -f preview/tup.config

View file

@ -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

View file

@ -45,6 +45,14 @@ $endfor$
$for(include-before)$
$include-before$
$endfor$
<div id="banner"></div>
<div id="navigation">
<a href=$webRoot$/index.html>Home</a>
<a href=$webRoot$/projects.html>Projects</a>
<a href=$webRoot$/about.html>About</a>
</div>
$if(title)$
<header id="title-block-header">
<h1 class="title">$title$</h1>