Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Portable Common Lisp library for filling templates with string values at runtime, featuring closure-based rendering and intelligent caching.
HTML-TEMPLATE is a portable Common Lisp library that fills templates with arbitrary string values at runtime to produce text output, most commonly HTML. It is loosely modeled after the Perl module HTML::Template and partially compatible with its syntax, though both libraries contain extensions the other does not support.
HTML-TEMPLATE is a portable library for Common Lisp that accepts templates containing placeholders and substitutes arbitrary string values into them at runtime. The output is a string that can serve as an HTML page or any other text format. The library compiles templates into efficient closures that can be re-used many times, and an intelligent cache mechanism recompiles templates automatically when they change. It is part of the EDICL project and its full documentation is available at https://edicl.github.io/html-template/.
HTML-TEMPLATE parses a template and compiles it into a closure that takes variable bindings as input and returns the fully substituted string. The intelligent cache watches template files, so when a template is modified, the library recompiles it automatically. The resulting render functions are efficient enough to be reused across many requests.
No. The library works with any text output; HTML is just the most common use case. You can use it for plain text, emails, or any structured text format.
It is loosely modeled after HTML::Template and shares part of its syntax. However, each library has extensions the other lacks, so complete compatibility is not guaranteed.
Yes. The intelligent cache recompiles templates as soon as they change, so the next call to a render function uses the updated version.
