diff --git a/README.md b/README.md index 499e31d..3d25bb5 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,30 @@ ocaml-mustache mustache.js logic-less templates in OCaml + +Example usage +------------- + +```ocaml +let tmpl = + Mustache.of_string "Hello {{name}}\n\ + Mustache is:\n\ + {{#qualities}}\ + * {{name}}\n\ + {{/qualities}}" + +let json = + `O [ "name", `String "OCaml" + ; "qualities", `A [ `O ["name", `String "awesome"] + ; `O ["name", `String "simple"] + ; `O ["name", `String "fun"] + ] + ] + +let rendered = + Mustache.render tmpl json +``` + Todo/Wish List ----------- * Support for ropes