markdown-it-theme

0.4.0 • Public • Published

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

Package Sidebar

Install

npm i markdown-it-theme

Weekly Downloads

25

Version

0.4.0

License

Unlicense

Unpacked Size

6.94 kB

Total Files

6

Last publish

Collaborators

  • miaoxingsoldier