Partials in Zola?

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.

Tera include

and Tera macros

I think that is what you are looking for

1 Like

Thanks a lot! Now I know what to look for :slight_smile:

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" %}
1 Like

Thanks!