Custom resolver
I have to create a custom resolver. This one has two sources: embedded (in the binary) and file (the local file system).
Example:
Embedded parent template:
{% block title %} parent title {% endblock title %}
Local child template:
{% extends "embedded://template" %}
{% block title %} child title {% endblock title %}
Currently, I use the method add_raw_template to add different templates, but following this way I have to create my own resolver.
There is another way to use the resolver used by the method Tera::new to add some custom behaviours without rewrite a resolver?
No custom resolvers no. Do you need to differentiate the origin?
Do you need to differentiate the origin?
Yes. Like that:
file://<template>for template in local file system.embedded://<template>for template embedded in the binary.
Yes but why not load all of them in one instance and just extend "template"? What I meant by Do you need to differentiate the origin? is can you have 2 templates with the same name and do you need to be able to refer to one or the other?
Otherwise there is no plan on having custom resolvers, you can use globwalk and rename manually if you need.