-
Notifications
You must be signed in to change notification settings - Fork 32
Description
When having a single repo with multiple templates for example it would be cool to have access to all the advanced features of Tera, like macros, blocks, includes etc.
Currently everything is rendered using one_off, thus no includes etc. work.
It might be possible to just pass the root path of the repo to Tera, not sure what the performance implications are when the repo is quite big (if Tera loads these files no matter what it would be hell, but if they're only loaded on demand anyways it should be fine).
That way something like that would be possible:
|- templates
| |- <templatename>
| | |- flake.nix
| | |- template.toml
|- utils/shared/common whatever
| |- flake.nix
And then be able to {% extend "utils/flake.nix" %} in templates/<name>/flake.nix. This way files and contents which are shared across templates could be pulled out to a single path, making maintenance easier :)
Repos containing just a single template could benefit from this aswell, as these features could still be used (the imported files just have to be added to ignore so they're just used by Tera)