Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinnn/gulp-front-matter
Extract front-matter header from files
https://github.com/shinnn/gulp-front-matter
Last synced: 12 days ago
JSON representation
Extract front-matter header from files
- Host: GitHub
- URL: https://github.com/shinnn/gulp-front-matter
- Owner: shinnn
- License: other
- Created: 2013-12-05T18:44:55.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-11-11T00:32:24.000Z (about 5 years ago)
- Last Synced: 2024-10-13T00:04:05.037Z (about 1 month ago)
- Language: JavaScript
- Size: 196 KB
- Stars: 76
- Watchers: 4
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-front-matter
[![npm version](http://img.shields.io/npm/v/gulp-front-matter.svg)](https://www.npmjs.com/package/gulp-front-matter)
[![Build Status](https://travis-ci.org/shinnn/gulp-front-matter.svg?branch=master)](https://travis-ci.org/shinnn/gulp-front-matter)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/gulp-front-matter.svg)](https://coveralls.io/r/shinnn/gulp-front-matter)## Information
Packagegulp-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
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).
```
npm install gulp-front-matter
```## Usage
```javascript
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](./LICENSE) © 2013 - 2015 Nicolas Chambrier, 2016 - 2017 Shinnosuke Watanabe