assemble / assemble-handlebars

Assemble engine plugin for Handlebars templates
https://github.com/assemble/assemble
MIT License
8 stars 19 forks source link

after update from v0.2.3 to v0.2.5, #compose not rendering {{{@conent}}}? #26

Open ghost opened 9 years ago

ghost commented 9 years ago

I was able to render multiple partials to a single page using handlebars-helper-compose prior to assemble-handlebars@0.2.5.

E.g. this worked fine in my page.hbs, where src/templates/partials had multiple .hbs partials: {{#compose cwd="src/templates/partials" src="*.hbs"}} {{{@content}}} {{/compose}}

I can still render the multiple partials if I revert the sub package for assemble to assemble-handlebars@0.2.3 (in my-project-folder/node_modules/assemble/node_modules/assemble-handlebars

@title, @basename, @filename etc all seem to work still. I can even log out the @content markup {{log @content}}, but when trying to render it, no markup is injected.

I have deleted my main node_modules folder and reinstalled all modules (npm install), but that didn't seem to help.

Version info: {{{@content}}} works with: assemble@0.4.42, handlebars-helper-compose@0.2.12 and assemble-handlebars@0.2.3. Not working as expected (for me) with: assemble@0.4.42, handlebars-helper-compose@0.2.12 and assemble-handlebars@0.2.5. Node: v0.10.20

Is there a slightly different way of using the compose helper since the latest update to assemble-handlebars?

Or, if you can't reproduce, could you offer suggestions?

(apologies if this should be logged on the handlebars-helper-compose project, but there didn't seem to be any changes to that code base recently)

Thanks

doowb commented 9 years ago

Thanks for pointing this out. There might be a change in handlebars 3 that is affecting the compose helper. Do you have a repo with the failing code that we can take a look at?

ghost commented 9 years ago

I created two public repos for testing: https://github.com/nuls1/compose-a-test.git https://github.com/nuls1/compose-b-test.git

The read me on test a has the most info, but in summary: When using {{{@content}}} with handlebars-helper-compose... Test a works where assemble-handlebars@0.2.3 is used. Test b fails where assemble-handlebars@0.2.5 is used. Test a and b are identical other than that.