☕ Markdown-to-HTML transpiler for broccoli nodes. Uses @chjj's fast markdown compiler, marked.
Install with npm. (Make sure you have installed Node.)
npm install --save-dev [email protected]:wizvishak/broccoli-marked.git
var Markdown = require('broccoli-marked');
htmls = Markdown('path/to/markdown-files');
To use highlight.js:
npm install --save-dev highlight.js
and in Brocfile:
var Markdown = require('broccoli-marked');
var highlight = require('highlight.js');
var htmls = Markdown('path/to/markdown-files', {
highlight: function (code) {
return highlight.highlightAuto(code).value;
}
});
You will need to include one of highlight.js's vast choice of styles including ones that resemble those at GitHub, GoogleCode and many more.
For example:
var highlightCss = pickFiles('node_modules/highlight.js', {
srcDir: 'styles',
files: ['googlecode.css'],
destDir: '.'
});
or just manually include the .css
in the .html
.
MIT