Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
What is the best way to pass a block from a layout to a parent layout? #853
I'm using Nunjucks layouts, and the
As I read it, the Addendum about existing Templating features states that “Eleventy’s layout system exists a layer above Nunjucks' Template Inheritance exposed with
So I thought
I tried to add an explicit
If I remove the
I must be missing something obvious, so how is it supposed to work?
If I recall correctly, in Eleventy, Nunjucks happily passes content through to the specified layout without using
At least, this seems to work for me™
I'm struggling to find the documentation I thought had lead me to that conclusion.
So it looks like it's either one or the other:
The later seems to be the best (or even the only way) to "pass" an HTML fragment (a "block") to the parent (extended) layout.