Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sdumetz/node-kiss-docwriter

Keep It Simple, Stupid : Document Writer helper module
https://github.com/sdumetz/node-kiss-docwriter

Last synced: about 1 month ago
JSON representation

Keep It Simple, Stupid : Document Writer helper module

Awesome Lists containing this project

README

        

# node-kiss-docwriter
Keep It Simple, Stupid : Document Writer helper module

Getting started :

```shell
npm install --save kiss-docwriter
```

Then :

```html



My kiss documents




document.addEventListener("DOMContentLoaded",function(){
var docwriter = new Kiss([{"name":"My Content Name","path":"README.md"}]);
});



```

*Tadam*, you're all set.

## Options

Enable syntax highlighting (with prismjs):
```js
var opts = {
renderer:{
codespan: function(code){
return "

"+code+"
";
}
},
gfm:true,
highlight:function(code,lang){
if (!lang||!prism.languages[lang]) {
lang = 'markup';
}
return prism.highlight(code, prism.languages[lang]);
}
}
var docwriter = new Kiss([{"name":"My Content Name","path":"README.md"}],opts);
```
Don't forget to include prismjs' JS and CSS files.