Closed tjaynl closed 11 months ago
What's the use case of this? It's possible to import javascript modules, but I assume you're talking about something different.
So i want to import some macro's that could be used in other files. For example i have a macro.njk which contains some macro's like:
{% macro even_columns(left, right, classes) %}
<section class="even-columns {{ classes }}">
<img src="{{ left }}" alt="">
<img src="{{ right }}" alt="">
</section>
{% endmacro %}
i want to import this file so i can use the macro in the content for example:
{{ even_columns("left.png", "right.png", "fullwidth" ) }}
Ok, understood. It's not possible right now, but it's a nice to have feature. I'll work on that.
Implemented in v0.7.0
So i was wondering if there is a {{ import "file" as file }} option in Vento and if not would it be possible to request this feature for a future release?