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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Renders markdown with custom elements inline for documentation
install doc-down --save
**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,
MIT