pugjs/doc-down

Name: doc-down

Owner: Pug

Description: Renders markdown with custom elements inline for documentation

Created: 2016-12-18 21:59:22.0

Updated: 2016-12-18 21:59:30.0

Pushed: 2017-01-22 02:40:24.0

Homepage: null

Size: 11

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

doc-down

Renders markdown with custom elements inline for documentation

Build Status Dependency Status NPM version

Installation
install doc-down --save
Usage
 **markdown**

 is a custom element where the content is treated as markdown:

ElementName(attribute="value")
is content **must** be indented to appear inside the element.

 is a custom element where the content is treated as plain text:

ElementName(attribute="value").
is is plain text.

 is an element without any content

ElementName(attribute="value")

On the server side/in advance if possible:

DocDown = require('doc-down');

t dd = new DocDown();

riteFileSync('data.json', JSON.stringify(dd.parse('some **markdown**')));

On the client side:

t data = require('./data.json');

ou can use any kind of react component here
tion MyElementName(props) {
turn <div>{props.children}</div>;

t customElements = {
ElementName,


tDOM.render(
age data={data} customElements={customElements}/>,
cument.body,

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.