Jingoo is OCaml template engine almost compatible with Jinja2(python template engine).
make sudo make install
opam install jingoo
difference between Jinja2 and Jingoo
- i18n features are not supported yet.
- Cause of language difference between ocaml and python, some of built-in filters are different from original one, especially orders of arguments and supported optional arguments etc.
- Single line comment is not supported. Because single '#' is used very much especially in html.
- Implicit conversion for keyword argument is not supported, so keyword label is always required.
Jg_template.from_file "hello.tmpl" ~models:[("msg", Tstr "hello, world!")]
- custom filter definition.
- extension by dynlink module.
see example directory for detail.