How to package macros in Zola?

I find myself using the same macros in different projects. Is there a way to package the macros other than duplicating macros.html files in different project folders? I thought about using a theme that includes macros.html but not sure this is optimal eg would it cause issues if I decide to include a third-party theme (right now I do not)?

This could be nice to separate the theme and the macros (and the shortcodes?). We could add in the config.toml something like macros = "macros_folder" which is orthogonal to the theme. The theme would only use it’s own macros, but the templates would be able to use both the theme and the macros_folder macros.

1 Like