Last active
June 7, 2021 04:38
-
-
Save Cartmanishere/89a3419c61c7351faa9d0d11891eb9cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[hbs.core :as hbs]) | |
;; render template string | |
(hbs/render "Hello {{person.name}}!" {:person {:name "John"}}) | |
;; OR | |
;; render template file with a registry | |
(def reg (hbs/registry (hbs/classpath-loader "/templates"))) | |
(hbs/render-file reg "mytemplate" {:name "John"}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment