Dimer is an open source project and CMS to help you publish your documentation online.
We believe every project/product is incomplete without documentation.
We want to help you publish user facing documentation, without worrying about tools or code
to write.
Remark Macro
Add macros to remark parser
This library gives you an opportunity to define macros, which can be used inside the markdown as follows.
# Hello Writing some markdown [alert]This is an alert message[/alert]
The alert
block is knows as a macro. By default the library will not parse this block. However, you can define a macro and then it will be parsed and all the contents will be forwarded to you.
const macro = macro
Installation
npm i --save remark-macro
Usage
const remark = const macro = const html = macro const markdown = `# Hello world [alert]This is an alert[/alert]` /** <h1> Hello world </h1> <div class="alert alert-note"><p> This is an alert </p></div>*/