This is a very simple website templating engine based on markdown and Lua, written by Tuomo Valkonen 〈〉.

It is not particularly supported or maintained; it was created back in 2009 to build my own website. The engine is still being used for that purpose. I decided to put the code online in 2017 after having had to spend some time to convert it to Lua 5.3 from which the module() function had been removed.

Features (see the included example):

Aside from the included compat_env.lua and the ltp engine (which is has not updated to Lua 5.3, and requires on the compat_env module), the code is in the public domain.


lgen is available from its Mercurial repository. You may either use Mercurial to clone the entire repository or you may download a snapshot as a zip or tarball. To clone use the command

hg clone https://tuomov.iki.fi/repos/lgen/


If you would like to contribute to this project, simply clone the repository and email me a hg bundle of your changes.