Closed loremipson closed 9 years ago
Yep, this is a syntax error. I should be clearer in my example.
The {{! ... }}
syntax is for comments (https://github.com/wycats/handlebars.js/#comments).
The {{> partialName }}
syntax is for partials (https://github.com/wycats/handlebars.js/#partials).
Based on your configuration, give this a try and let me know how it goes:
{{> partials/header }}
Ah, perfect.. that was it! Thanks for clarifying, this plugin is great by the way, exactly what I've been wanting in a static build with Gulp.
Thanks again
Awesome! I'm glad this little plugin has been helpful to you.
It's entirely possible, and likely that I'm just not grasping handlebars yet, but I can't seem to get standalone .hbs partials to work. I'm not getting an error or anything, they're just not pulling in how I'm expecting them.
I have a couple of directories for partials. One for layouts, ie:
Inside my partials directory, I have two files:
header.hbs
andfooter.hbs
I should just be able to call them both in my files, correct? With
{{! header.hbs }}
? It doesn't seem to be pulling in anything. Am I incorrect in thinking of partials as includes with hbs, or should that be doing what I want?Here's my gulpfile for reference:
Thanks ahead of time!