{"repo":"dannote/lua-template","free":true,"listed":false,"github":"https://github.com/dannote/lua-template","clone":"git clone https://github.com/dannote/lua-template.git","description":"The simplest Lua template engine","language":"Lua","stars":66,"topics":["lua","template","template-engine"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"lua-template ============ The simplest Lua HTML template engine in just a few lines of code Installation ------------ luarocks install template Compiling templates ------------------- Templates can be compiled by either running templatec template.tpl -o template.lua nor by passing a string to template.compile . Syntax ------ In short, Lua expressions must be included between percent signs and Lua statements must be placed beetween question marks. Variables and expressions Variables and expressions without HTML escaping Loops Conditional Template inclusion Templates are compiled to a general Lua file and hence can be loaded by require statement: Evaluating templates -------------------- template.print takes three arguments: template function, a table with variables passed to the template and optionally a callback function, which handles string printing ( print is used by default). Compressing templates --------------------- template.compile has an optional minify argument and templatec has -m option.","default_branch":null,"files":null,"tree":[],"storefront":"/r/dannote","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dannote/lua-template/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}