Skip to content

Instantly share code, notes, and snippets.

@Vbitz
Created April 19, 2019 10:37
Show Gist options
  • Save Vbitz/e960ea9eadf720ad27449b340cfed2ed to your computer and use it in GitHub Desktop.
Save Vbitz/e960ea9eadf720ad27449b340cfed2ed to your computer and use it in GitHub Desktop.
docgen
PANDOC= pandoc
POPTS=
all: Testing.html
Testing.html: Testing.md template.html
$(PANDOC) $(POPTS) --template template.html Testing.md -o Testing.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$ class="h-100">
<head>
<meta charset="utf-8" />
<meta name="generator" content="Pandoc DocGen Template" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
<style type="text/css">
body{background-color: #FAF0E6 !important;}
.title,h1,h2{font-family: "Roboto Slab", serif; border-bottom: 1px solid brown; color: #400000 !important;}
h3{font-size: 120% !important; font-family: "Roboto Slab", serif;}
p {text-align: justify !important;}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
.title {font-size: 300%; font-weight: bold; display: block; margin-top: 0.5em; margin-bottom: 0.75em;}
nav[data-toggle=toc] .nav-link.active, nav[data-toggle=toc] .nav-link.active:focus, nav[data-toggle=toc] .nav-link.active:hover nav[data-toggle=toc] .nav>li>a:focus,nav[data-toggle=toc] .nav>li>a:hover {border-left-color: #400000 !important; color: #400000 !important;}
</style>
<link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Slab" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.css">
</head>
<body data-spy="scroll" data-target="#toc" class="d-flex flex-column h-100">
<main role="main" class="flex-shrink-0">
<div class="container">
<span class="title">$title$</span>
<div class="row">
<div class="col-sm-3">
<nav id="toc" data-toggle="toc" class="sticky-top"></nav>
</div>
<div class="col-sm-9">
$body$
</div>
</div>
</div>
</main>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script>
<script type="text/javascript">
document.querySelectorAll("table").forEach((table) => {
table.className = "table";
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment