package yocaml_liquid

  1. Overview
  2. Docs
Yocaml plugin for using Liquid as a template language

Install

dune-project
 Dependency

Authors

Maintainers

Sources

yocaml-3.0.1.tbz
sha256=9091d2c578cfbd15ff87f3d0dc9a64f9e02e714a22d37da14823083ec46a51b1
sha512=22231c3852a8345b6a6947c367e7cc311b57ccf2869a5d7c681384e7c0c18f0a17217ebc04ae9523833941ac71f136185cdc75090fe0849fa42a4f8a01d5e203

doc/yocaml_liquid/Yocaml_liquid/index.html

Module Yocaml_liquidSource

Plugin for describing templates using liquid-ml, an OCaml implementation of Shopify's Liquid templating language.

Injection

Description of a pipeline for reading a template and injecting content.

Sourceval 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.

Sourceval 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.

Sourcemodule Pipeline : sig ... end

Describes the arrowized interface for reading a file as a template and injecting content and variables.

Data template

Describes the Yocaml_liquid module as a template engine. Allows the latter to be passed to any function requiring it.

The type that describes the template language.

Sourceval from : Yocaml.Data.t -> t

from data Transforms a normalized data representation (data) into an associative list of data that can be injected into a template.

Sourceval render : ?strict:bool -> (string * t) list -> string -> string

render ?strict parameters content injects parameters data into content and returns the result of the applied content. To inject metadata into a template.