If you find this useful, please consider supporting my work with a donation.
A markdown-it plugin to support Markua-style asides and blurbs, such as:
{aside}Something said to the side.{/aside}
{blurb}Something else you should know.{/blurb}
{blurb, class: warning}
Don't do this!
{/blurb}
A> Something said to the site.
B> Something else you should know.
- Node.js 12.22+
npm install @humanwhocodes/markdown-it-markua-aside --save
# or
yarn add @humanwhocodes/markdown-it-markua-aside
Import into your project:
// CommonJS
const { asidePlugin } = require("@humanwhocodes/markdown-it-markua-aside");
// ESM
import { asidePlugin } from "@humanwhocodes/markdown-it-markua-aside";
After importing, create a new instance of DataExtractor
. The constructor expects one object argument that defines the data schema.
For example:
import MarkdownIt from "markdown-it";
import { asidePlugin } from "@humanwhocodes/markdown-it-markua-aside";
// create a new instance
const md = new MarkdownIt();
// install the plugin
md.use(asidePlugin);
// render your text
const result = md.render("{aside}Hello world!{/aside}");
- Fork the repository
- Clone your fork
- Run
npm install
to setup dependencies - Run
npm test
to run tests
Apache 2.0