README.md

Sun, 06 Sep 2020 22:12:52 +0300

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sun, 06 Sep 2020 22:12:52 +0300
changeset 35
2f927eae429b
parent 24
4013d2901832
permissions
-rw-r--r--

Don't auto-create directories that will be empty


# lgen

This is a very simple website templating engine based on markdown and Lua,
written by Tuomo Valkonen ⟨<tuomov@iki.fi>⟩.

It is not particularly supported or maintained; it was created back in 2009
to build [my own website](http://tuomov.iki.fi/). 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 from earlier versions to [Lua 5.3][Lua] from which the `module()` function had been removed.

## Features

For details see the included example.

  * Embedded Lua code with the ltp engine.
  * Advanced markdown features, including syntax highlighting of code blocks
    and LaTeX mathematics via
    [markdown-it][] and [KaTeX][] or [Pandoc][]. Markdown-it is now the default renderer. To select lua-markdown, use `renderer: lua-markdown` in the page YAML meta section. Use `renderer: pandoc` for Pandoc.

## Installation

You need to install [Lua 5.3][Lua] and [LuaFileSystem][], e.g. using
[LuaRocks][]):
```sh
$ luarocks install luafilesystem
```
To use [markdown-it][], you need to install [NodeJS][] and then execute `npm install` to install in the top directory of this project.

## License

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.

[KaTeX]: https://katex.org/
[markdown-it]: https://github.com/markdown-it/markdown-it
[Pandoc]: https://pandoc.org/
[Lua]: http://www.lua.org/
[NodeJS]: https://nodejs.org/en/
[LuaRocks]: https://luarocks.org/
[LuaFileSystem]: http://keplerproject.github.io/luafilesystem/

mercurial