I’m running Pandoc from a shell script, with multiple passes. The HTML template I am using here is fairly complex and should be used both for html and chunkedhtml output.
In the template, I have placed a navigation in a conditional (simplified here):
$-- $if(document-type-chunked)$
<nav class="sitenav">
<a href="$next.url$">$next.title$</a>$ <a href="$previous.url$">$previous.title$</a>
</nav>
$-- $endif$
In the shell script, I set this meta variable (document-type-chunked):
pandoc --standalone $(basename $file) --to=chunkedhtml --metadata document-type-chunked=true --output=${outputname%.*}
The metadata variable is still true for the first page of the chunked output (index.html), but not for the remaining chunks, so they get no navigation.
Am I making a mistake?
I realize I could also put conditionals around each single navigation item ($if(next.url)$), but it would be easier to build complex templates if I could pass a variable to the template.
Could this be resolved differently?
Thank you.