grunt-markade
A Markade build step for grunt
Getting Started
This plugin requires Grunt ~0.4.5
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-markade --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "markade" task
Overview
In your project's Gruntfile, add a section named markade
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.template
Type: String
Default value: empty.jade
A file path to the Jade template. If none is specified it simply parses out all Markdown content.
options.jade
Type: Object
Default value: {}
An object with options to pass to Jade.compile
. Values like pretty: true
.
Usage Examples
Default Options
In this example, the default options are used to compile a Markade file.
So if file.md
has content **bold** text
then default.html
would be <b>bold</b> text
.
grunt;
Template
Add a template
option to parse the data through the Jade template.
grunt;
Directory
You can compile all files in a directory.
grunt; #### Jade Options You can pass objects to Jade ```jsgrunt.initConfig({ markade: { with_layout: { options: { "template": "templates/index.jade", "jade": { "pretty": true } }, files: { "public/index.html": "data/index.md" } } },}); ## ContributingIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).