Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/sdumetz/node-kiss-docwriter
- Owner: sdumetz
- License: gpl-3.0
- Created: 2016-01-19T08:31:40.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-19T14:28:32.000Z (almost 9 years ago)
- Last Synced: 2024-10-12T19:46:58.813Z (2 months ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-kiss-docwriter
Keep It Simple, Stupid : Document Writer helper moduleGetting 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.