package weberizer

  1. Overview
  2. Docs
Compile HTML templates into OCaml modules

Install

Dune Dependency

Authors

Maintainers

Sources

weberizer-0.7.8.tbz
sha256=f0f9bfc250c1176152389ac513004423131281f84da751b4f11eb81d3761df24
md5=00404cfa89d106f5d527ad46e2b3fdea

Description

Weberizer is a simple templating engine for OCaml. It compiles the template to an OCaml module, providing an easy way to set the variables and render the template. String values are automatically escaped according to the context of the template in which they appear. You can add you own functions to the generated module — for example to set several related variables at once (you can also hide those variables from the interface if desired).

Tags

web template

Published: 01 Jun 2018

README

README.md

Weberizer

Weberizer is a simple templating engine for OCaml. It compiles the template to an OCaml module, providing an easy way to set the variables and render the template. String values are automatically escaped according to the context of the template in which they appear. You can add you own functions to the generated module — for example to set several related variables at once (you can also hide those variables from the interface if desired).

This approach will enable to easily add some security features if desired — like forcing several variables to be set before the template can be rendered.

Installation

The simplest way to install this library and program is to use opam:

opam install weberizer

The program to transform HTML files is called weberizer. Issue weberizer templ.html to generate templ.ml and templ.mli. The templating “variables” are described at the beginnin of weberizer.mli. See also the example.

Licence

This library is released under the LGPL-3.0 with the OCaml linking exception.

Dependencies (3)

  1. ocamlnet
  2. jbuilder >= "1.0+beta7"
  3. ocaml >= "4.03"

Dev Dependencies

None

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.