grunt-sundown is a wrapper for robotskirt(Sundown) - a C implementation of Markdown

Getting Started

This plugin requires Grunt ~0.4.1

If you haven’t used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you’re familiar with that process, you may install this plugin with this command:

npm install grunt-sundown --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-sundown');

You can find the project on Github.

The “sundown” task

Overview

In your project’s Gruntfile, add a section named sundown to the data object passed into grunt.initConfig().

grunt.initConfig({
  sundown: {
    target: {
      options: {
        extensions: {
          fenced_code: true
        },
        render_flags: {
          skip_html: true
        }
      },
      files: {
        'output.html': ['input1.md', 'input2.md']
      }
    }
  }
});

Options

options: {
  extensions: {
    autolink: false,
    fenced_code: false,
    lax_html_blocks: false,
    no_intra_emphasis: false,
    space_headers: false,
    strikethrough: false,
    tables: false
  },
  render_flags: {
    skip_html: false,
    skip_style: false,
    skip_images: false,
    skip_links: false,
    expand_tabs: false,
    safelink: false,
    toc: false,
    hard_wrap: false,
    use_xhtml: false,
    escape: false
  },
  separator: '\n\n' // concat option for multiple files
}

More Information

You can try your luck on the Sundown homepage. Or check out some of the other wrappers.