Skip to content

vuiets/broccoli-marked

 
 

Repository files navigation

broccoli-marked

Build Status

☕ Markdown-to-HTML transpiler for broccoli nodes. Uses @chjj's fast markdown compiler, marked.

Install

Install with npm. (Make sure you have installed Node.)

npm install --save-dev [email protected]:wizvishak/broccoli-marked.git

Usage

var Markdown = require('broccoli-marked');
htmls = Markdown('path/to/markdown-files');

Code Highlighting

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.

Thanks To

License

MIT

About

☕ Markdown-to-HTML compiler for broccoli nodes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.2%
  • CoffeeScript 35.8%