Created
July 23, 2021 12:32
-
-
Save Cartmanishere/8611a6750bf8e3f17478d0d4feb6a74c 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
(ns ... | |
(:import [com.github.jknack.handlebars.io TemplateLoader URLTemplateSource] | |
[java.net URL])) | |
(defn http-loader-reify | |
[base-url] | |
(reify TemplateLoader | |
(resolve [this filename] | |
(str base-url filename (. this getSuffix))) | |
(sourceAt [this uri] | |
(let [location (. this resolve uri)] | |
(URLTemplateSource. location (URL. location)))) | |
(getSuffix [this] | |
".hbs"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment