0.4.0 • Published 4 years ago

markdown-it-theme v0.4.0

Weekly downloads
5
License
Unlicense
Repository
github
Last release
4 years ago

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

NameTypeDescriptionDefault
themestringThe class of html tag.undefined
aliasfunctionAlias class of html tag.undefined