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:

Since this plugin uses LiveScript, run grunt livescript before other tasks.
Alternatively, run grunt twice. The first time you run it you will probably get an error
that certain javascripts do not yet exist.

npm install grunt-panda --save-dev

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

If the string matches the root of the file path (which usually starts with whatever is
specified in the files cwd option), then this root will be replaced in the output metadata.
The file foo/bar/bat.md normally generates metadata in foo.bar.bat.meta, but if metaReplace
were "foo/", the metadata would appear in bar.bat.meta.

If a valid metaReplace string is given (which can be ""), then that string will be replaced with the
given replacement in the output metadata.
e.g. The file foo/bar/bat.md normally generates metadata in foo.bar.bat.meta, but if metaReplace
were "foo/bar", and metaReplace were "baz", the metadata would appear in baz.bat.meta.

Limits the number of pandoc child processes that can be spawned at any one time. Increase the number
if you find this helps with performance and if you are not concatenating files into one destination. If you are concatenating markdown, the order is likely to matter and can only be guaranteed when the spawnLimit is 1.

If the input files contain metadata in the header,
this can be removed by setting here the separator string.
This separates the meatadata from the markdown content.
The metadata and the separator will be ignored.
The separator must start at the beginning of the line.
If no separator is seen at all, the whole content will be processed.

If a pipeToModule node module path is given, the task will require the module. It should return a
function of one parameter. The task will call that function passing the metadata object as a parameter.
If the module if given as a javascript file name, then the path must be absolute or relative to grunt-panda's Gruntfile.

If a postProcess function is given, panda passes any generated metadata object to it. The function acts as a filter, returning the metadata object transformed in some way. Typically useful for making future searches faster.

Aborts with an error message if there is a YAML error. See grunt badtest.

version-0.2.6

Allows an array of pandocOptions.

version-0.2.5

removed debugger leftovers. Yaml detection should now work on windows file too.

version-0.2.4

added metaOnly option which creates only the metadata and does not run pandoc. Useful for 2 pass processing.

added

version-0.2.3

Metadata is now written to the grunt configuraion variable defined in the metaDataVar option.

version-0.2.2

Added metaReplace and metaReplacement options. These are useful in order to adjust the paths inside metadata
to convenient values no matter where your source markdown lives.

version-0.2.1

Revised behaviour so panda now always generates an aggregate yaml file, optionally passing the file
through a filter before writing it. The filter is typically used by an application to expand the data to speed up future searches - e.g. by making references bidirectional, or preparing contexts for page generation.

version-0.1.13

Removed some debug logging. Revised Getting Started advice.

version-0.1.12

Fixed bug that meant a write to yaml metadata file had to be configured even though
pipeToModule option was used instead.

version-0.1.11

Added pipeToModule option to facilitate further processing without the need to write and then read in a metadata file.

version-0.1.10

Removed --section-divs option as it does not play well with raw html. The html nesting ends up broken.

version-0.1.9

Default pandoc options now include -S for typographically correct output.

version-0.1.8

Added ability to extract and merge metadata to yaml file(s).

version-0.1.7

Changed test1 so it tests lodash template processing

Improved test4 to catch issue 2

Fixed silly asynchronous bug by piping data direct to pandoc rather than by using
a temporary file.

Added spawnLimit option to control number of pandoc child processes.

Changed default options for markdown to html

Changed stripMeta default to 4 backticks. Backticks play better than dashes when source markdown is previewed without stripping. They are interpreted as a code block in both Github and Pandoc flavour markdown.

Moved async dependency from developer to user dependencies in package.json

version-0.1.6

Tests use normalised pathnmames for Windows compatibility

version-0.1.5

Now works with file globbing

version-0.1.4

Revised process option description

version-0.1.3

Relaxed requirement for metadata heading to start with metadata delimiter.