HTML templating a la Mustache?

My personal recommendation is tyxml via its jsx ppx. This allows you to write your templates in .re files, and thus use a very natural HTML syntax, interspersing OCaml values as needed using the tyxml APIs for those times when simple interpolation of values isn’t sufficient. There was some recent-ish discussion around this topic, e.g. Htmx/hc web development approach - #16 by cemerick, and a pile of replies further downthread.

2 Likes