Created
February 5, 2021 20:17
-
-
Save Ddedalus/8360b23def706780054b391ba0aeec3a to your computer and use it in GitHub Desktop.
Pandoc template for HTML body
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
1. Work out the data dir: pandoc --version | |
2. Put this file in the data directory: %APPDATA%/pandoc/templates | |
3. Add pandoc option: --template=bodyonly.html | |
4. Add YAML metadata to .md file: title, subtitle, date, author, toc, toc-title, include-beofre, include-after | |
--> | |
$for(include-before)$ | |
$include-before$ | |
$endfor$ | |
$if(title)$ | |
<header id="title-block-header" style="text-align:center"> | |
<h1 class="title">$title$</h1> | |
$if(subtitle)$ | |
<h3 class="subtitle"><i>$subtitle$</i></h3> | |
$endif$ | |
$for(author)$ | |
<h3 class="author">$author$</h3> | |
$endfor$ | |
$if(date)$ | |
<p class="date"><i>$date$</i></p> | |
$endif$ | |
</header> | |
$endif$ | |
$if(toc)$ | |
<nav id="$idprefix$TOC" role="doc-toc"> | |
$if(toc-title)$ | |
<h2 id="$idprefix$toc-title">$toc-title$</h2> | |
$endif$ | |
$table-of-contents$ | |
</nav> | |
$endif$ | |
$body$ | |
$for(include-after)$ | |
$include-after$ | |
$endfor$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment