-
Notifications
You must be signed in to change notification settings - Fork 10
daly88/lutem
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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
About
a lua template engine like a famous python template engine jinja2
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published