package yocaml_jingoo
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Yocaml plugin for using Jingoo as a template language
Install
dune-project
Dependency
Authors
Maintainers
Sources
yocaml-2.2.0.tbz
sha256=967db87e63b7da8c3f127df5461eb86d0da9d41ef20e1957beacec9df5ec760c
sha512=930d98d22f19232b498a399e86c88a8ec87d49886eaeb1c296ff48b6d7f1da6c420c53472028410ef83d1914e8268924636353378b5e99bf0e93783769519c9f
doc/src/yocaml_jingoo/yocaml_jingoo.ml.html
Source file yocaml_jingoo.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42(* YOCaml a static blog generator. Copyright (C) 2024 The Funkyworkers and The YOCaml's developers This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. *) module Tpl = struct type t = Jingoo.Jg_types.tvalue let rec from = function | Yocaml.Data.Null -> Jingoo.Jg_types.Tnull | Yocaml.Data.Bool b -> Jingoo.Jg_types.Tbool b | Yocaml.Data.Int i -> Jingoo.Jg_types.Tint i | Yocaml.Data.Float f -> Jingoo.Jg_types.Tfloat f | Yocaml.Data.String s -> Jingoo.Jg_types.Tstr s | Yocaml.Data.List l -> Jingoo.Jg_types.Tlist (List.map from l) | Yocaml.Data.Record a -> Jingoo.Jg_types.Tobj (List.map (fun (k, v) -> (k, from v)) a) let render ?(strict = true) parameters content = let env = Jingoo.Jg_types.{ std_env with strict_mode = strict } in Jingoo.Jg_template.from_string ~env ~models:parameters content end module Pipeline = struct let as_template (type a) (module I : Yocaml.Required.DATA_INJECTABLE with type t = a) ?strict template = Yocaml.Pipeline.as_template (module Tpl) (module I) ?strict template end include Tpl
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>