-
I’m building a single page site as roughly described here using collections derived from a set of markdown files in nested directories. Currently each .md has a template specified in the front matter. These templates correspond to names of include templates which are rendered using the derived ‘page’ data in a custom collection. For example with iconBlock.njk in _includes/: fun.md:
_layouts/section.njk:
Instead, is there a way to include the result of rendering a template using its
(Naturally with iconBlock.njk in _layouts) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Occurs to me I could do this with a two stage render, first outputting the partials (using layouts) into _includes. Before injecting them in a second pass. This is problematic though, as I have more than a single depth of includes within includes. I’m hoping to avoid multiple passes if I can. |
Beta Was this translation helpful? Give feedback.
-
Thank-you @pdehaan ! |
Beta Was this translation helpful? Give feedback.
Thank-you @pdehaan !