Package Exports
- parser-front-matter
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parser-front-matter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
parser-front-matter

Front matter parsing middleware based on gray-matter.
This is kind of like a consolidate.js engine, but for parsing. Works with Assemble, verb, express.js, parser-cache, or any application with similar conventions.
Install
Install with npm
$ npm i parser-front-matter --save
Usage
var parser = require('parser-front-matter');
Related
- gray-matter: Parse front-matter from a string or file. Fast, reliable and easy to use. Parses YAML… more
- parser-cache: Cache and load parsers, similiar to consolidate.js engines.
- parsers: Like consolidate.js, but for parsers instead of engines.
- parser-csv: CSV parser, compatible with [parser-cache].
- template: Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… more
API
.parse
Parse the given file
into a normalized file
object and callback next(err, file)
. Options are passed to gray-matter, and if options
has a locals
property, it will be merged with the data
property on the normalized file
object.
Normalized file
objects should have the following properties:
path
The source file path, if provideddata
: metadata, from yaml front matter and/or localscontent
: the content of a file, excluding front-matterorig
: the original content of a file, including front-matter
Params
file
{String|Object}: The object or string to parse.options
{Object|Function}: ornext
callback function.next
{Function}: callback function.
.parseSync
Parse the given file
and return a normalized file
object,
with data
, content
, path
and orig
properties.
Params
file
{String|Object}: The object or string to parse.options
{Object}: to pass to gray-matter.
Author
Jon Schlinkert
License
Copyright © 2014-2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 27, 2015.