Skip to content

Instantly share code, notes, and snippets.

@Ddedalus
Created February 5, 2021 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ddedalus/8360b23def706780054b391ba0aeec3a to your computer and use it in GitHub Desktop.
Save Ddedalus/8360b23def706780054b391ba0aeec3a to your computer and use it in GitHub Desktop.
Pandoc template for HTML body
<!--
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