# How to package macros in Zola?

**URL:** <https://zola.discourse.group/t/how-to-package-macros-in-zola/1536>\
**Category:** Support\
**Created:** [November 9, 2022, 11:36pm UTC](https://zola.discourse.group/t/how-to-package-macros-in-zola/1536 "2022-11-09T23:36:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrGo](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/drgo/32/828_2.png) [@DrGo](https://zola.discourse.group/u/DrGo)\
**Post date:** [November 9, 2022, 11:36pm UTC](https://zola.discourse.group/t/how-to-package-macros-in-zola/1536/1 "2022-11-09T23:36:17Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![HugoTrentesaux](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hugotrentesaux/32/105_2.png) [@HugoTrentesaux](https://zola.discourse.group/u/HugoTrentesaux)\
**Post date:** [December 5, 2022, 10:49am UTC](https://zola.discourse.group/t/how-to-package-macros-in-zola/1536/2 "2022-12-05T10:49:29Z")

</div>

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.
