md2html

Markdown to single HTML converter.
Feature
The md2html converts Markdown to a single file HTML.
All scripts and css will be embeded in the file
and thus the converted file is viewable even offline.
Additionally, the md2html has option to embed image to HTML by base64 encode
and hence the file is conveyable without any resources.
Sample
Github Pages
The html file is generated by following command
$ md2html example/*.md -e -t -m -s -f example/img/nocd5.png -o gh-pages/index.html
Installation
GO111MODULE=on go get github.com/nocd5/md2html
Usage
md2html -i <input Markdown> [-o <output HTML>] [-e] [-t] [-m] [-s] [-f <path to icon>]
if -o option was abbreviated, input Markdown file name + .html will be used as output HTML file name.
Embedding images
-e/--embed option enables embedding images that are located local storage by Base64 encoding.
TOC
-t/--toc option enables generating TOC.
Using MathJax
-m/--mathjax option enables using MathJax.
Table row/col span
-s/--span option enables using rowspan/colspan for table tag
Favicon
-f/--favicon option enables embedding icon for favicon
Example
Please execute the following commands to make example files.
# make html files from each markdown files
$ md2html -e example/*.md
# make a concatinated single html file from markdown files
$ md2html -e -t example/*.md -o example/concat.html
Custom JS & CSS
$ go get -d github.com/nocd5/md2html
$ cd ${GOPATH}/src/github.com/nocd5/md2html
###########################################################
# customize "{$GOPATH}/src/github.com/nocd5/md2html/src/" #
###########################################################
$ npm intall && gulp
$ assets.go.rb
$ go install
Use libraries
Go
JS
Acknowledgement