The branch master has been updated via 895ee9dcaa50a72637b907dd3ab62723e23863f9 (commit) from 8557dd2bb3cebee18ec35347250271322b09d5da (commit)
- Log ----------------------------------------------------------------- commit 895ee9dcaa50a72637b907dd3ab62723e23863f9 Author: Richard Levitte <levi...@openssl.org> Date: Tue Jan 29 12:43:41 2019 +0100 Markdown to OpenSSL HTML5 pages Markdown is a popular format for text files, and some documents are easier to read in this form than in HTML. For future purposes, this is the scripts we need to process markdown files into HTML5. This script is based on pandoc, which is a pretty good translator between a range of different document formats. Reviewed-by: Matt Caswell <m...@openssl.org> (Merged from https://github.com/openssl/web/pull/108) ----------------------------------------------------------------------- Summary of changes: bin/md-to-html5 | 15 +++++++++++++++ bin/md-to-html5.tmpl.html5 | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 bin/md-to-html5 create mode 100644 bin/md-to-html5.tmpl.html5 diff --git a/bin/md-to-html5 b/bin/md-to-html5 new file mode 100755 index 0000000..7bb815b --- /dev/null +++ b/bin/md-to-html5 @@ -0,0 +1,15 @@ +#! /bin/sh + +template="$0.tmpl.html5" + +for f in "$@"; do + b=`basename "$f" .md` + if [ "$f" != "$b" ]; then + bns=`echo "$b" | sed -e 's| *||g'` + t=`dirname "$b"`.tmpl.html5 + if [ ! -f "$t" ]; then + t="$template" + fi + pandoc -t html5 --template="$t" "$f" > "$bns.html" + fi +done diff --git a/bin/md-to-html5.tmpl.html5 b/bin/md-to-html5.tmpl.html5 new file mode 100644 index 0000000..b1fbe38 --- /dev/null +++ b/bin/md-to-html5.tmpl.html5 @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html lang="en"> +<!--#include virtual="/inc/head.shtml" --> + +<body> +<!--#include virtual="/inc/banner.shtml" --> + + <div id="main"> + <div id="content"> + <div class="blog-index"> + <article> +$if(title)$ +<header> +<h1 class="title">$title$</h1> +$if(subtitle)$ +<p class="subtitle">$subtitle$</p> +$endif$ +$for(author)$ +<p class="author">$author$</p> +$endfor$ +$if(date)$ +<p class="date">$date$</p> +$endif$ +</header> +$endif$ +$body$ + </article> + </div> + <!--#include virtual="sidebar.shtml" --> + </div> + </div> + +<!--#include virtual="/inc/footer.shtml" --> +</body> _____ openssl-commits mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits