8.18
Beeswax: a Pollen-friendly template language
(require beeswax) | package: beeswax |
Beeswax is a simple templating language. A Beeswax template wraps its contents in a function that can be imported by other modules and applied to data to get a rendered document. Having a #lang for your templates has a few small benefits: it lights up all the little conveniences of your IDE, if you use one (DrRacket, racket-mode, etc.); it’s a little easier to reason about and reuse in other contexts; and it can make renders faster (because the template can be compiled).
Beeswax was designed to be easy to use within Pollen projects, but can be of use in other Racket projects as well.
If you use Beeswax in your project, email Joel to
introduce yourself! This is the sole condition of the project’s
permissive license. (See
How I License for background.)
Installation: To install Beeswax from the command line:
> raco pkg install beeswax |
Or using DrRacket: click the File menu → Install Package ….