A collection of posthtml plugins to enable annotations in your Markdown.
- mdannotation-import: to import an HTML file.
- mdannotation-addclass: to add classes to the next paragraph.
- mdannotation-alert: to create alert components.
- mdannotation-embed: to embed videos, code playgrounds, etc.
To use an annotation plugin on Markdown content, you should first convert it with your favorite markdown converter. Then you could process the html with posthtml.
npm i markdown --save
npm i posthtml --save
const markdown = require('markdown').markdown;
const posthtml = require('posthtml');
const annotationPlugin = require('mdannotation-plugin');
const html = markdown.toHTML(md);
return posthtml()
.use(annotationPlugin)
.process(html)
.then(function (result) {
console.log(result.html);
})
;
We use Lerna to manage our monorepos.
# node modules loading
lerna bootstrap
# Run tests accross every packages
lerna run test