# Templates outside templates folder

**URL:** <https://zola.discourse.group/t/templates-outside-templates-folder/1734>\
**Category:** Uncategorized\
**Created:** [May 3, 2023, 8:23am UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734 "2023-05-03T08:23:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack999](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jack999](https://zola.discourse.group/u/jack999)\
**Post date:** [May 3, 2023, 8:23am UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734/1 "2023-05-03T08:23:44Z")

</div>

Hello

I am developing several sites with zola, and find it magnificent. One issue is that there is some common content between the sites, and it would be good to share that with templates/macros.

Is there a way to include templates/macros from outside the templates folder?

At the moment I am using softlinks, but that has 2 problems. a) zola does not pick up changes in files in softlinked folders, and b) softlinks dont survive syncing to different operating systems.

or is there a different solution to such problems?

best, jack

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [May 3, 2023, 10:50am UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734/2 "2023-05-03T10:50:11Z")

</div>

No way to handle that currently. I guess it could work as a theme maybe?

---

<div class="post-metadata">

**Author:** ![jack999](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jack999](https://zola.discourse.group/u/jack999)\
**Post date:** [May 3, 2023, 11:58am UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734/3 "2023-05-03T11:58:29Z")

</div>

Thanks @keats, yes I considered themes, in this specific case will not work.

Then doing it in javascript loaded from a central url is one alternative.

again, thanks for a great ssg.

---

<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:** [May 6, 2023, 7:08pm UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734/4 "2023-05-06T19:08:41Z")

</div>

I raised the same issue before. The challenge with using themes as you know is that it requires duplicating the macro code in every theme that uses it.

I do not normally wish for new features as I share your philosophy of minimalist software. But I think having a way to share macro code between sites and themes is one of those rare things that Zola truly needs. I imagine it as simple (from the user perspective) as adding an “include path” to the config file of whatever site/theme needs to use a library of macros. I think that will actually help keep Zola minimal as many requested features can hopefully be implemented as Zola macros and distributed as libraries. Just a thought. Thanks,

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [May 6, 2023, 8:31pm UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734/5 "2023-05-06T20:31:20Z")

</div>

> [@DrGo](#):
>
> he challenge with using themes as you know is that it requires duplicating the macro code in every theme that uses it.

I meant that you could create a themes for your macros and re-use that for your sites.

---

<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:** [May 6, 2023, 8:44pm UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734/6 "2023-05-06T20:44:54Z")

</div>

You mean I could use more than one theme in one site?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [May 6, 2023, 9:29pm UTC](https://zola.discourse.group/t/templates-outside-templates-folder/1734/7 "2023-05-06T21:29:11Z")

</div>

Ah no that doesn’t work if you’re already using a theme
