1.0.2 • Published 8 years ago

md-to-html v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

md-to-html

honeo/md-to-html
md-to-html

なにこれ

markdownファイルをhtmlファイルに変換する。
GitHub風Style、SyntaxHighlight、TOC付き。

使い方

$ npm i -S md-to-html
import md2html from 'md-to-html';

const promise = md2html('foo.md', 'bar.html', {
	breaks: true,
	maxdepth: 2,
	title: 'page-title'
});

API

md2html(input, output , options)

options {
	encode: 'utf8', // fs.method(,, encode, )
	maxdepth: 6, // TOC深度
	style: 'monokai-sublime' // highlight.js/src/styles/${style}.css
	title: 'title' // <title>${title}</title>
	// ...and marked options
}