markdown-it-chain
A chaining API like webpack-chain but for markdown-it.
Install
Yarn
yarn add -dev markdown-it-chain
npm
npm install --save-dev markdown-it-chain
Getting Started
// Require the markdown-it-chain module. This module exports a single// constructor function for creating a configuration API.const Config = // Instantiate the configuration with a new APIconst config = // Make configuration changes using the chain API.// Every API call tracks a change to the stored configuration.config // Interact with 'options' in new MarkdownIt // Ref: https://markdown-it.github.io/markdown-it/#MarkdownIt.new options // equal to .set('html', true) // Interact with 'plugins' // The first parameter is the plugin module, which may be a function // while the second parameter is an array of parameters accepted by the plugin. // Move up one level, like .end() in jQuery. // Apply this plugin before toc. // Create a markdown-it instance using the above configurationconst md = configmd
Worth Reading
In order to ensure the consistency of the chained API world, webpack-it-chain
is developed directly on the basis of webpack-chain and ensures that the usage is completely consistent.
Here are some things worth reading that come from webpack-chain
:
Author
markdown-it-chain © ULIVZ, Released under the MIT License.
Authored and maintained by ULIVZ with help from contributors (list).
github.com/ulivz · GitHub @ULIVZ · Twitter @_ulivz