markdown-it-theme
v0.4.0
Published
A markdown-it plugin for theme customization.
Downloads
226
Maintainers
Readme
markdown-it-theme
A markdown-it plugin for theme customization.
Usage
index.md
# header
markdown-it-theme `plugin`
index.js
var fs = require('fs')
var plugin = require('markdown-it-theme')
var options = { theme: 'custom-md-theme' }
var md = require('markdown-it')().use(plugin, options)
var input = fs.readFileSync('index.md', 'utf-8')
var result = md.render(input)
console.log(result)
Result
<h1 class="custom-md-theme">header</h1>
<p class="custom-md-theme">markdown-it-theme <code class="custom-md-theme">plugin</code> </p>
options
Name | Type | Description | Default
------------------|----------|------------------------|-----------
theme
| string | The class of html tag. | undefined
alias
| function | Alias class of html tag. | undefined