I have some Haml partials, many of which contain the boilerplate
.container
.row
.col-lg-12
When I try to abstract that out ala = partial "site_section"
, I get:
syntax error, unexpected keyword_end, expecting end-of-input end;end;end;end
I'm using ruby 2.2.2.
How do I render a Haml partial within a Haml partial in Middleman?
Thanks
update This is apparently some kind of special case dealing with my partial (above). I have other partials-within-partials rendering just fine.
update With respect to this this repo, the layout would actually be:
_site_section:
.container
.row
.col-lg-12
_nested_section:
= partial "site_section"
MOAR (nested) HAML
index.haml:
=partial "nested_section"
Because of the way HAML works the following is invalid:
If you want to add more text or HAML then you can achieve it for example by putting the text at the same level of the previous line
Or nesting it within a div:
So If what you are trying to do is to nest extra HAML to the output of the site_section partial, then you have to put the nested extra HAML in the nested partial:
Hope this helps, I updated the repo with the working example.