Parsing and handling of compile-time vs. run-time. Avoiding unnecessary work by pre-processing the template structure and content and reacting to the runtime context map with a prepared data structure instead of a raw template. Anything other than a raw tag value injection is a runtime dispatch fn. Compile-time here means the first time we see a template at runtime, not the implementation's compile-time.
Parsing and handling of compile-time vs. run-time. Avoiding unnecessary work by pre-processing the template structure and content and reacting to the runtime context map with a prepared data structure instead of a raw template. Anything other than a raw tag value injection is a runtime dispatch fn. Compile-time here means the first time we see a template *at runtime*, not the implementation's compile-time.
(add-tag! k handler & tags)
tag name, fn handler, and maybe tags
tag name, fn handler, and maybe tags
(ensure-list list-maybe)
Turns the argument into a list if it isn't a list already.
Turns the argument into a list if it isn't a list already.
(filter-tag {:keys [tag-value]})
Compile-time parser of var tag filters.
Compile-time parser of var tag filters.
(parse parse-fn
input
&
[{:keys [tag-open tag-close filter-open filter-close tag-second
short-comment-second]
:or {tag-open *tag-open*
tag-close *tag-close*
filter-open *filter-open*
filter-close *filter-close*
tag-second *tag-second*
short-comment-second *short-comment-second*}
:as params}])
(render s context-map & [opts])
render takes the string, the context-map and possibly also opts.
render takes the string, the context-map and possibly also opts.
(render-file filename-or-url
context-map
&
[{:keys [cache custom-resource-path url-stream-handler]
:or {cache (clojure.core/deref cache?)
custom-resource-path *custom-resource-path*
url-stream-handler *url-stream-handler*}
:as opts}])
Parses files if there isn't a memoized post-parse vector ready to go, renders post-parse vector with passed context-map regardless. Double-checks last-modified on files. Uses classpath for filename-or-url path
Parses files if there isn't a memoized post-parse vector ready to go, renders post-parse vector with passed context-map regardless. Double-checks last-modified on files. Uses classpath for filename-or-url path
(render-template template context-map)
vector of ^selmer.node.INodes and a context map.
vector of ^selmer.node.INodes and a context map.
(set-resource-path! path)
set custom location, where templates are being searched for. path may be a java.net.URL instance or a string. If it's a string, we first try to convert it to a java.net.URL instance and if it doesn't work it's interpreted as a path in the local filesystem.
set custom location, where templates are being searched for. path may be a java.net.URL instance or a string. If it's a string, we first try to convert it to a java.net.URL instance and if it doesn't work it's interpreted as a path in the local filesystem.
(tag-content rdr start-tag & end-tags)
Parses the content of a tag. Returns a map of tag-name -> args & content, which can then be interpreted by the calling function.
Parses the content of a tag. Returns a map of tag-name -> args & content, which can then be interpreted by the calling function.
(update-tags tag tags content args buf)
Assocs in the passed tag to the tags map.
Assocs in the passed tag to the tags map.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close