package weberizer

Not available on OCaml 5.5
  1. Overview
  2. Docs

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

Added to opam-repository:

README

Build Status Build status

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 beginning of weberizer.mli (also available in HTML). See also the example.

Licence

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

Dependencies (3)

  1. ocamlnet
  2. dune
  3. ocaml >= "4.03"

Dev Dependencies

None

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building weberizer with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.8 (this version) good good n/a n/a n/a
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure