Make a stripped-down html5 mail template

Mon, 01 May 2017 13:20:47 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 01 May 2017 13:20:47 -0400
changeset 556
0313b9d2f171
parent 555
fe459e7fd0af
child 557
6631ca6ce1a1

Make a stripped-down html5 mail template

.pandoc/templates/mail.html5 file | annotate | diff | comparison | revisions
bin/mutt-md2html file | annotate | diff | comparison | revisions
new file mode 100644
--- /dev/null
+++ b/.pandoc/templates/mail.html5
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html$if(lang)$ lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
+  <head>
+    <meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+    <style type="text/css">code{white-space: pre;} body{line-height:1.2em} $if(quotes)$q { quotes: "“" "”" "‘" "’"; } $endif$ $if(highlighting-css)$ $highlighting-css$ $endif$</style>
+  </head>
+  <body>
+    $body$
+  </body>
+</html>
--- a/bin/mutt-md2html
+++ b/bin/mutt-md2html
@@ -1,2 +1,7 @@
 #!/bin/sh
-exec pandoc -sS --self-contained --highlight-style=monochrome -f markdown -t html5 $*
+exec pandoc -sS \
+  -f markdown -t html5 \
+  --self-contained \
+  --template=mail \
+  --highlight-style=monochrome \
+   $*

mercurial