tourist/template
src/tourist/template.tur
render-template wrapper (requires tur-template dep).
Since: v0.1.0
defn
render-template
(render-template [path : cstr env : int] :)
render a template file against an Env.
Parameters
| path | path to the template file, e.g. "views/greet.html.tur" | |
| env | Env handle from env-new or make-env |
Returns
:cstr -- rendered output (heap-allocated); "" on render failure
Example
(html (render-template "views/index.html.tur" (env-new)))
Since: v0.1.0
Internal definitions
__rt-extract-ok-- extract the ok_val cstr from a result handle and free