How can I use a njk include in an md template #3245
Replies: 3 comments 9 replies
-
@mwinterheller in your eleventy configuration is where you configure where 11ty will look for includes - see docs so in your example |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thank you everyone who tried to help! I ended up removing all whitespaces and adding additional line breaks. That worked well enough. |
Beta Was this translation helpful? Give feedback.
-
Hi,
really love eleventy! Thank you so much for this powerful tool.
I have a markdown blog post which I save as an .md file. Inside I would like to use a njk include.
{% include 'get-download-element.njk' %}
This worked great and the element got rendered within the blog post without issues. However, now I have to actually use njk logic within the get-download-element.njk template. Everything after the line where the logic starts within the get-download-element.njk seems to gets escaped? I can partly overcome this by not using any indents - but this does not seem to work too well either.
I am sure I am missing something here.
Thank you for the help!
/Michael
Beta Was this translation helpful? Give feedback.
All reactions