A minimal Clojure/Script library for Hiccup style templating.
(require '[hiccup-template.core :as ht])
(def data
{:person
{:first-name "John"
:last-name "Doe"}})
(def template
[:div
[:label "first name " :data/person.first-name]
[:label "last name " :data/person.last-name]])
(ht/hiccup template data)
; [:div [:label "first name " "John"] [:label "last name " "Doe"]]
(ht/html template data)
; <div><label>first name John</label><label>last name Doe</label></div>
Can you improve this documentation? These fine people already did:
Dmitri Sotnikov & dmitri.sotnikov@gmail.comEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close