SkillAgentSearch skills...

Lutem

a lua template engine like a famous python template engine jinja2

Install / Use

/learn @daly88/Lutem
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Welcome

lutem (short for LUa TEMplate engine) is a template render engine like jinja2(a famous template engine written in Python) It's used for auto code generation, dynamic html page generation or other kinds of dynamic text generation

Template Syntax

The syntax is almost the same with jinja2 or Django template,

Loop generate:

{% for k in mp %} ... --this area would be repeated {% endfor %}

variable replacement: {{ variable/raw }} variable example: {{ xxx }} {{ tbl.v }} special raw: {{ '{{' }}

Template Inheritance

child template inheritance by parent template: {% extends abc.tmpl %}

Declare block: {% block blockname %} ... {% endblock %}

The child template will overwrite the parent's block content if correspond block name declared in child template

Example

See the test.lua and test.tmpl

View on GitHub
GitHub Stars35
CategoryDevelopment
Updated3y ago
Forks10

Languages

Lua

Security Score

60/100

Audited on Dec 13, 2022

No findings