shannonmoeller / gulp-hb

A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.
http://npm.im/gulp-hb
MIT License
147 stars 14 forks source link

v3/v4 gulp-front-matter usage? #32

Closed spacedawwwg closed 8 years ago

spacedawwwg commented 8 years ago

I'm a little confused by the README as to how gulp-front-matter can be integrated now.

I have tried to follow the instructions:

.pipe(frontMatter({
      property: 'data.front',
      remove: true
    }))
{{file.data.front.title}}

does the above seem right to you?

spacedawwwg commented 8 years ago
{{front.title}} 

Boom, thats how to use it in this instance! (I'm going to let you get on with your life now @shannonmoeller!)

shannonmoeller commented 8 years ago

The file option is now false by default as it was largely only included in v2 for the purpose of accessing file.data. Now that file.data is the default context for files, I didn't want gulp-hb to continue to override the file property anymore in case a user wanted that for something else.

Sorry for all the headaches these breaking changes caused. I hope your struggles help future googlers.

shannonmoeller commented 8 years ago

Thanks again for helping to make this plugin stable and usable.