shannonmoeller / gulp-hb

A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.

Home Page:http://npm.im/gulp-hb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v3/v4 gulp-front-matter usage?

spacedawwwg opened this issue · comments

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?

{{front.title}} 

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

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.

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