A compiled template in Liquid, Jinja, Django, Nunjucks, Twig, Tera, HubL, Mailchimp
or Mustachio: from the language module's compile/2, or its sigil, such as ~JINJA, which
compiles the template with your code.
iex> import Braces.Jinja, only: :sigils
iex> template = ~JINJA"Hi {{ name|title }}!"
iex> template.language
:jinja
iex> to_string(template)
"Hi {{ name|title }}!"
iex> Braces.render_to_string(template, %{"name" => "ada"})
{:ok, "Hi Ada!"}Render it with Braces.render/3, or its language's render/3. language and source say
what it is, and to_string/1 gives the source; the other fields are how Braces renders it.
Handlebars and Mustache templates are a Braces.Handlebars.Template and a
Braces.Mustache.Template.
Summary
Types
@type t() :: %Braces.Template{ helpers: term(), language: Braces.language(), source: String.t(), template: term(), values: term() }