How can I use partials with haml in metalsmith-layouts?
The docs lists {{> nested/footer }}
as a way to use partials in handlebars but I can't work out an equivalent for haml.
How can I use partials with haml in metalsmith-layouts?
The docs lists {{> nested/footer }}
as a way to use partials in handlebars but I can't work out an equivalent for haml.
Unfortunately consolidate.js
doesn't implement the partials
option for all it's supported templating languages (which is what metalsmith-layouts and in-place use when you use the partials
option).
If you check the consolidate.js source for haml you can see that it doesn't use the partials
object when rendering haml. The locals
option is parsed however, so you could see if you can use that.
Metalsmith-layouts and in-place will pass on any options they don't recognise to consolidate, so passing a locals
option would be the way to go.