1 #!/bin/sh
2 #
3 # Convert a markdown file to an html file
4 #
5 # usage: md2html <markdown_file>
6 #
7 # html content is output to stdout.
8 #
9 # github style sheet from:
10 # https://github.com/sindresorhus/github-markdown-css
11 # Markdown.pl is from:
12 # http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip
13 #
14 echo '<!DOCTYPE html>'
15 echo '<html xmlns="http://www.w3.org/1999/xhtml">'
16 echo ' <head>'
17 echo " <title>Zumo CC3200 `basename $1`</title>"
18 echo ' <link rel="stylesheet" type="text/css" href="etc/github-markdown.css">'
19 echo ' <style>'
20 echo ' .markdown-body {'
21 echo ' min-width: 200px;'
22 echo ' max-width: 790px;'
23 echo ' margin: 0 auto;'
24 echo ' padding: 30px;'
25 echo ' }'
26 echo ' </style>'
27 echo ' </head>'
28 echo ' <body ><article class="markdown-body">'
29 perl `dirname $0`/Markdown.pl $1
30 echo ' </article></body>'
31 echo '</html>'