A chaining API for markdown-it, similar to webpack-chain, enabling declarative configuration of markdown-it options and plugins. Version 1.3.0 is the latest and only stable release; no further updates are expected. It requires markdown-it >=5.0.0 as a peer dependency. The package provides a fluent, jQuery-like chain for setting HTML/typographer options and registering plugins with before/after ordering. Its key differentiator is providing a structured, webpack-chain-inspired API for markdown-it, which is useful for complex configurations where order of plugins matters. It is not actively maintained and has no built-in TypeScript types.
npm install markdown-it-chainVerified import paths — ran on the pinned version, not inferred.
Creates a markdown-it configuration via chain API, adds plugins with ordering, and renders Markdown.
Use dynamic import: const Config = (await import('markdown-it-chain')).default; or transpile with bundler.Use plain markdown-it API or evaluate if chaining is needed.
Explicitly call .before() or .after() on the plugin being ordered, referencing the name of the other plugin.
Always pass plugin options as an array: .use(plugin, [options]) even if single option.
Switch to CommonJS require: const Config = require('markdown-it-chain'); or use createRequire in ESM.Install markdown-it: npm install markdown-it --save
Ensure you use config.options.html(...).end(); use .set() if direct access needed.