From c04da1ec4c2992aff9d5cc07e834de69d3c3105f Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Wed, 30 Oct 2024 14:53:08 +0100 Subject: [PATCH] generate HTML --- doc/scenarios/template.html | 124 ++++++++++++++++++++++++++++++++++++ doc/scenarios/to-html | 11 ++++ 2 files changed, 135 insertions(+) create mode 100644 doc/scenarios/template.html create mode 100755 doc/scenarios/to-html diff --git a/doc/scenarios/template.html b/doc/scenarios/template.html new file mode 100644 index 00000000..1bb16e52 --- /dev/null +++ b/doc/scenarios/template.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ + $if(title-prefix)$$title-prefix$ - $endif$$pagetitle$ + +$if(quotes)$ + +$endif$ +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + + + + $if(title)$ + + $endif$ +
+
+ $if(toc)$ +
+
+ + $toc$ + +
+
+ $endif$ +
+ + $if(abstract)$ +

$abstract-title$

+ $abstract$ + $endif$ + + $for(include-before)$ + $include-before$ + $endfor$ +$body$ + $for(include-after)$ + $include-after$ + $endfor$ +
+
+
+ + + + diff --git a/doc/scenarios/to-html b/doc/scenarios/to-html new file mode 100755 index 00000000..a66ff4d0 --- /dev/null +++ b/doc/scenarios/to-html @@ -0,0 +1,11 @@ +#!/bin/bash +# This script loops over all markdown (.md) files in the current directory +# and converts each to an HTML file using pandoc using template.html. + +# Origin of the template (GPL v3.0): +# https://github.com/ryangrose/easy-pandoc-templates/blob/master/html/easy_template.html + +for file in *.md; do + pandoc "$file" --template template.html -o "${file%.md}.html" +done +