A Markdown filter for Broccoli using Christopher Jeffrey's fast "marked" parser and compiler

Usage no npm install needed!

<script type="module">
  import broccoliMarked from '';



Build Status

A Markdown filter for Broccoli using Christopher Jeffrey's fast Markdown parser and compiler Marked. This plugin is too built for speed through doing the parsing and compiling asynchronously. You can ask for code highlighting too using highlight.js (see Code Highlighting below).


npm install --save-dev broccoli-marked


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

Code Highlighting

To use highlight.js:

npm install --save-dev highlight.js

and in Brocfile:

var markdownToHtml = require('broccoli-marked');
var highlight = require('highlight.js');

var htmls = markdownToHtml('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.