misaki.compiler.default.template documentation

Template file loader

apply-template

(apply-template f contents)
Apply contents data to template function.

load-template

(load-template file)(load-template file allow-layout?)
Load template file, and return evaluated function.
Template options are contained as meta data.

If `allow-layout?` option is specified, you can select whether evaluate layout or not.

load-template-data

(load-template-data file)
Load template slurped body(String) and option.

parse-tag-string

(parse-tag-string tags)
Parse tag string to tag list.

"aa,bb"
;=> [{:name "aa", :url TAG-PAGE-URL}
;    {:name "bb", :url TAG_PAGE-URL}]

parse-template-option

Parse template options from slurped data.

; @layout default
; @title hello, world
[:h1 "hello world"]

;=> {:layout "default", :title "hello, world"}