JSPM

markdown-it-theme

0.4.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44068
  • Score
    100M100P100Q142885F
  • License Unlicense

A markdown-it plugin for theme customization.

Package Exports

  • markdown-it-theme

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (markdown-it-theme) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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