shannonmoeller / handlebars-layouts

Handlebars helpers which implement layout blocks similar to Jinja, Nunjucks (Swig), Pug (Jade), and Twig.
http://npm.im/handlebars-layouts
MIT License
361 stars 29 forks source link

is there a way to use inline partials? #51

Open unstoppablecarl opened 1 year ago

unstoppablecarl commented 1 year ago

handlebarsjs has an inline partials feature now. It would be nice to be able to do {{#embed 'my_inline_partial'}}{{/embed}}. Is there a different way to use them I'm missing?

Inline partials also do not appear to work from within a child context of a block or content or embed. Where the inline partial was defined in a parent context.

shannonmoeller commented 1 year ago

It's been a number of years since I've used Handlebars with any regularity, so I'm afraid I'm not up to speed on how newer versions of Handlebars maintain lists of partials. Given that Handlebars has this functionality built-in now, is handlebars-layouts still helpful?

unstoppablecarl commented 1 year ago

I would say yes. Its got some slightly different abilities with extend vs embed. It would make more sense if it was something built ontop of the existing inline partials feature though

shannonmoeller commented 1 year ago

I'd be open to a PR if you wanted to dig into what it would take to update this library to be able to see those.