Mustache is a pretty limited template language. In particular with respect to conditionals. Here are some options for moving away from it:
-
Use Ruby. I don't know this language yet but I heard it's pretty well suited for advanced templating (in particular with ERB IIUC).
-
Parse the meta.yml file and generate everything in OCaml. IINM, there doesn't exist a YAML parser in OCaml but there is a new parser for a variant of it which is probably very suitable for what we do with this language: https://github.com/chetmurthy/yay
EDIT: this project is what we call "templates v2" and it's most up-to-date description is here.
Mustache is a pretty limited template language. In particular with respect to conditionals. Here are some options for moving away from it:
Use Ruby. I don't know this language yet but I heard it's pretty well suited for advanced templating (in particular with ERB IIUC).Parse the
meta.ymlfile and generate everything in OCaml. IINM, there doesn't exist a YAML parser in OCaml but there is a new parser for a variant of it which is probably very suitable for what we do with this language: https://github.com/chetmurthy/yayEDIT: this project is what we call "templates v2" and it's most up-to-date description is here.