lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

My (HTML) templating engine for Lua with special support for Nginx / OpenResty (HttpLuaModule):

I started this for my own needs. I shortly looked at other alternatives in templating (, but I though that there was a room for another implementation. The syntax should be familiar (not 1:1) to anyone who has worked with things like Mustache ( or say PHP.

I feel that the codebase is quite stable, and the performance is good (especially the cached performance). I also think that the API is clean, while still allowing some extensions / overwrites for flexibility. I have not yet made automated unit tests or integrated this with LuaRocks. At this point I wish to receive feedback. The code is fully Lua 5.2 and LuaJIT 2.x compatible. It doesn't work with Lua 5.1 as the 5.1 version of load-function is different. It could be made to work with 5.1 using setfenv, but that is not on my agenda (if I don't get enough feedback to add support for it). Feel free to fork it, if you need 5.1 support, or send me a pull request if you have managed to make things work on 5.1 (and even earlier versions).

So, please take a look at it on Github (it's fairly well documented there).