Skip to content

hongchangwu/jingoo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jingoo

about jingoo

Jingoo is OCaml template engine almost compatible with Jinja2(python template engine).

install

manual

make
sudo make install

opam

opam install jingoo

difference between Jinja2 and Jingoo

  1. i18n features are not supported yet.
  2. 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.
  3. Single line comment is not supported. Because single '#' is used very much especially in html.
  4. Implicit conversion for keyword argument is not supported, so keyword label is always required.

simple usage

Jg_template.from_file "hello.tmpl" ~models:[("msg", Tstr "hello, world!")]

advanced usage

  1. custom filter definition.
  2. extension by dynlink module.

see example directory for detail.

cheatsheet

see "example/cheatsheet.tmpl".

license

MIT License

About

OCaml template engine almost compatible with jinja2

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • OCaml 94.0%
  • Standard ML 3.1%
  • Makefile 2.9%