verb
Version:
Verb makes it easy to build project documentation using simple markdown templates, with zero configuration required.
27 lines (22 loc) • 563 B
JavaScript
/**
* Verb <https://github.com/assemble/verb>
* Generate markdown documentation for GitHub projects.
*
* Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.
* Licensed under the MIT license.
*/
;
var matter = require('gray-matter');
var _ = require('lodash');
/**
* Parse and extract YAML, JSON or Coffee
* front matter.
*
* @return {Object}
* @api public
*/
exports.init = function(src, options) {
var defaults = {autodetect: true};
var opts = _.defaults({}, options.matter, defaults);
return matter(src, opts);
};