Hi all,
Is there anything akin to Hugo partials in Zola? Starting to find myself doing a bit too much copy-pasting of html right now, and would love to find a way of keeping it DRY…
Hi all,
Is there anything akin to Hugo partials in Zola? Starting to find myself doing a bit too much copy-pasting of html right now, and would love to find a way of keeping it DRY…
have a look at the Tera documentation. Tera is the template engine under the hood of Zola.
and Tera macros
I think that is what you are looking for
Thanks a lot! Now I know what to look for
I usually create a “partials” folder inside of the “/templates” folder. Then like @Marco said, you can use the Tera include statement.
{% include "partials/yourpartial.html" %}
Thanks!