Hi,
I wanted to start a new thread here for lua-resty-template that I created last weekend (based on tirtemplate.lua). Mainly because I do not want to pollute the another thread ("simple and fast Lua templating engine") with this.
The project can be found from here:
I think that the code is now quite stable, and the current functionality is fairly well documented (on Github). The code base is relatively small, just around 100 lines of Lua. So it is easy to understand, and fork. What I wish here is that I could get some feedback. Do you find lua-resty-template useful? Do you think that it is missing something important?
Something that I have been thinking about:
- Implementing variable modifiers (http://www.smarty.net/docs/en/language.modifiers.tpl)?
- Somekind of a plugin architecture?
- Do you think that it is better for render just to return a string instead of outputting it aka template.compile(file)(context) == template.render(file, context) or should I drop render alltogether?
I kinda like how small the whole thing is, and I do not personally have needs to add functionality beyond what is currently provided (I'd rather remove code if it can be simplified). But I surely would like to know if there are any bugs, edge cases, or possibilities to optimize things (LuaJIT string buffer sounds great when it is ready, what else?).
Kind Regards
Aapo