Markdown builder for Node
Usage
npm install --save markdown-builder
Using markdown-builder
is quite easy:
const markdown = ;const headers = markdown; headers // ### 3rd Header
Example
Check out 30-seconds-of-code's READMEs, they are automatically generated using markdown-builder
API
Headers
Use the h1
,h2
,h3
,h4
,h5
,h6
or hX
to generate a markdown header. Calling hX
with a level above 6
returns a h6
Header.
const markdown = const headers = markdown headers // # 1st Headerheaders // ## 2nd Headerheaders // ### 3rd Headerheaders // ##### 5th Header using hX
Emphasis
const markdown = const emphasis = markdown emphasisemphasisemphasis
Lists
const markdown = const lists = markdown let a = 'Item 1' 'Item 2'// ordered listlists// 1. Item 1// 2. Item 2lists // use callbacks to alter each item// 1. ITEM 1// 2. ITEM 2 // unordered Listlistslists
Miscellaneous
const markdown = const misc = markdown // Imageslet alt = 'image of lights' url = 'https://www.w3schools.com/w3css/img_lights.jpg' title = 'lights'miscmisc // Collapsible summary/details blockmisc; // Github Anchormisc; // #a-header-with--special-characters // Linkmisclink'Github' 'https://github.com/flxwu' // horizontal rulemisc
Collapsible: