gulp-frontmatter-wrangler

2.0.0 • Public • Published

gulp-frontmatter-wrangler

Temporarily remove YAML frontmatter from a file and put it back whenever you want.

Installation

npm install gulp-frontmatter-wrangler --save-dev

Function Documentation

frontmatter.take(UNIQUE_NAMESPACE_STRING) frontmatter.putBack(UNIQUE_NAMESPACE_STRING)

UNIQUE_NAMESPACE_STRING: A string to identify your specific task. Ex. "pug", "sass", or "my blog posts".

Example Code

var gulp = require('gulp')
var frontmatter = require('gulp-frontmatter-wrangler')

gulp.task('default', function() {
  return gulp.src('*.pug')
    .pipe(frontmatter.take("pug")) // Remove the frontmatter
    
    // Process your files however you want

    .pipe(frontmatter.putBack("pug")) // Put the frontmatter back
    .pipe(gulp.dest('dist/'))
  })

Readme

Keywords

Package Sidebar

Install

npm i gulp-frontmatter-wrangler

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

3.28 kB

Total Files

3

Last publish

Collaborators

  • dougbeney