API
IwaiEngine.Template — Type
TemplateCompiled IwaiEngine template.
Template objects are callable. Pass a NamedTuple as the render context.
IwaiEngine.parse — Function
parse(source; optimize_buffer_size = true, autoescape = true, path = nothing, root = nothing) -> TemplateCompile an IwaiEngine template from a string.
optimize_buffer_size=truereuses the largest previously observed output size as the next render buffer hint.autoescape=trueenables HTML escaping for{{ ... }}expressions unless the value is marked with thesafefilter or rendered inside{% autoescape false %}.pathis used to resolve relative{% include %}and{% extends %}paths.rootconstrains file-backed template resolution to a specific directory tree.
IwaiEngine.load — Function
load(path; optimize_buffer_size = true, autoescape = true, root = nothing) -> TemplateLoad and compile a file-backed IwaiEngine template.
Templates are cached by absolute path, mtime, optimize_buffer_size, autoescape, and root. Relative {% include %} and {% extends %} paths are resolved from the current file's directory and are prevented from escaping the configured root.