This works by constructing a DOM tree before serializing, so it still gives all the correctness that libraries like CL-WHO provide.
Here's a complete example:
(markup:enable-reader)
(markup:deftag template (children &key title)
<html>
<head>
<title>,(progn title)</title>
</head>
<body>
,@children
</body>
</html>)
(hunchentoot:define-easy-handler (foobar :uri "/") ()
(markup:write-xml
<template title="Hello" >
<h1>hello world!</h1>
</template>))
Depends on: str, alexandria, named-readtables, trivial-gray-streams
Repository: https://github.com/moderninterpreters/markup
License: Apache 2
HTML Generator