shinnn / Gulp Front Matter
Licence: other
Extract front-matter header from files
Stars: ✭ 76
Programming Languages
javascript
184084 projects - #8 most used programming language
gulp-front-matter
Information
Package | gulp-front-matter |
Description | Extract `YAML Front-Matter` header from files, removes it from `contents` and add a new `frontMatter` property to file object. |
Node Version | ≥ 4 |
Installation
npm install gulp-front-matter
Usage
const gulp = require('gulp');
const frontMatter = require('gulp-front-matter');
gulp.task('blog-posts', () => {
return gulp.src('./posts/*.md')
.pipe(frontMatter({ // optional configuration
property: 'frontMatter', // property added to file object
// also works with deep property selectors
// e.g., 'data.foo.bar'
remove: true // should we remove front-matter header?
}))
.pipe(…) // you may want to take a look at gulp-marked at this point
});
LICENSE
2-Clause BSD License © 2013 - 2015 Nicolas Chambrier, 2016 - 2017 Shinnosuke Watanabe
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].