1Installation

2Usage

2.1API

Create a template from template-data, which must be in JSON Template syntax.

The returned procedure expects a single argument, the substitution context, and returns the expanded template as a string. Three types of contexts are supported:

Primitive contexts. These may be of any form whatever (valid primitive contexts are lists, numbers, symbols, strings, etc.) and are not treated specially. Their only purpose is being printed into the template expansion as plain text. Note that a primitive context does not make a whole lot of sense when used as an argument to "make-template" (although it can be used as such and referenced as "@"); it is much more commonly encountered as a nested context in a map.

Sequences. These may be any kinds of <sequence?> objects. This includes lists, vectors, and sets, among others. They can be iterated over by the use of repeated sections.

Maps. These may be any kinds of <dict?> objects; in particular, association lists and hash tables are fine choices. They can be indexed into by substitutions.

make-template’s behavior can be customized by the parameters formatters, meta-left, meta-right, default-formatter, and format-char.