Consistent Syntax
It is easy to read and a pleasure to write. Markup closely resembles the resulting DOM tree.
(p (q "Hello World"))
<p><q>Hello World</q></p>
Idiosyncracies of HTML, such as the arbitrary distinction between elements and attributes, are automatically made sensible.
(iframe (srcdoc (html (lang "en") (head) (body "Howdy"))))
<iframe srcdoc='<html lang=en>Howdy'></iframe>
Mandatory Validation
Elements and attributes are checked for conformance with the HTML standard, meaning every generated document is guaranteed to be valid.
(fieldset (button "compute") (legend "calculation"))
HTML-ERROR :LEGEND must be the first child of :FIELDSET
There is never any need to allow unsafe or unescaped text. All content is appropriately and correctly sanitized.
(a (href :path ("." "©") :query (q "/")) "#")
<a href='./%C2%A9?Q=%2F'>#</a>
Flexible Templates
Custom user-defined templates reduce repetition and increase productivity.
The system is versatile enough to function as a static site generator, or to produce markup on-demand as a dynamic website’s templating engine.
(doc
:title "Home"
:heading '(~ (:lang "fr") "Bienvenue")
:content `(:p "It is now " ,(iso-8601 (now))))))
Blazing Performance
Templates are compiled to efficient machine code for unparalleled speed.
My entire website can be compiled in less time than other systems take to generate a single page.
$ find htdocs/ -name '*.html' -delete ; ./regen.sh
Regenerated lipidity.com
Evaluation took:
0.021 seconds of real time
0.021301 seconds of total run time (0.019260 user, 0.002041 system)
100.00% CPU
31 lambdas converted
77,573,016 processor cycles
8,892,224 bytes consed