package yocaml_mustache
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a006e9d52e520986d4262dfe7bfeba6a381f1423be32409494888d667d14ac73
sha512=8a25f1776e0bcd5e317484b681c67b0d6bb60952f0dd0942f44bf708fb3db03331522b4d8929e09c1926b213003bf14bb148468ddde35add0ad657b4d9237bd1
doc/yocaml_mustache/Yocaml_mustache/index.html
Module Yocaml_mustache
Source
Plugin for describing templates using ocaml-mustache, an implementation of the logic-less templating engine Mustache.
Injection
Description of a pipeline for reading a template and injecting content.
val read_template :
?snapshot:bool ->
?strict:bool ->
Yocaml.Path.t ->
(unit,
(module Yocaml.Required.DATA_INJECTABLE with type t = 'a) ->
metadata:'a ->
string ->
string)
Yocaml.Task.t
Return a function that apply ~metadata
and ~content
to a given template. Made the usage with applicative easier.
val read_templates :
?snapshot:bool ->
?strict:bool ->
Yocaml.Path.t list ->
(unit,
(module Yocaml.Required.DATA_INJECTABLE with type t = 'a) ->
metadata:'a ->
string ->
string)
Yocaml.Task.t
Return a function that apply ~metadata
and ~content
to a list of templates (in sequential order). Made the usage with applicative easier.
Describes the arrowized interface for reading a file as a template and injecting content and variables.
Data template
Describes the Yocaml_mustache
module as a template engine. Allows the latter to be passed to any function requiring it.
The type that describes the template language.
from data
Transforms a normalized data representation (data
) into an associative list of data that can be injected into a template.