123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051(* 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/>. *)moduleTpl=structtypet=Jingoo.Jg_types.tvalueletrecfrom=function|Yocaml.Data.Null->Jingoo.Jg_types.Tnull|Yocaml.Data.Boolb->Jingoo.Jg_types.Tboolb|Yocaml.Data.Inti->Jingoo.Jg_types.Tinti|Yocaml.Data.Floatf->Jingoo.Jg_types.Tfloatf|Yocaml.Data.Strings->Jingoo.Jg_types.Tstrs|Yocaml.Data.Listl->Jingoo.Jg_types.Tlist(List.mapfroml)|Yocaml.Data.Recorda->Jingoo.Jg_types.Tobj(List.map(fun(k,v)->(k,fromv))a)letrender?(strict=true)parameterscontent=letenv=Jingoo.Jg_types.{std_envwithstrict_mode=strict}inJingoo.Jg_template.from_string~env~models:parameterscontentendletread_template?snapshot?stricttemplate=Yocaml.Pipeline.read_template(moduleTpl)?snapshot?stricttemplateletread_templates?snapshot?stricttemplates=Yocaml.Pipeline.read_templates(moduleTpl)?snapshot?stricttemplatesmodulePipeline=structletas_template(typea)(moduleI:Yocaml.Required.DATA_INJECTABLEwithtypet=a)?snapshot?stricttemplate=Yocaml.Pipeline.as_template(moduleTpl)(moduleI)?snapshot?stricttemplateendincludeTpl