Fri, 17 Jul 2020 12:25:24 -0500
fix weird nodejs length/index
18 | 1 | |
2 | # lgen | |
11 | 3 | |
4 | This is a very simple website templating engine based on markdown and Lua, | |
21
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
5 | written by Tuomo Valkonen ⟨<tuomov@iki.fi>⟩. |
11 | 6 | |
7 | It is not particularly supported or maintained; it was created back in 2009 | |
13 | 8 | to build [my own website](http://tuomov.iki.fi/). The engine is still being |
16 | 9 | used for that purpose. I decided to put the code online in 2017 after |
21
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
10 | 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. |
11 | 11 | |
21
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
12 | ## Features |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
13 | |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
14 | For details see the included example. |
16 | 15 | |
19 | 16 | * Embedded Lua code with the ltp engine. |
21
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
17 | * Advanced markdown features, including syntax highlighting of code blocks |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
18 | and LaTeX mathematics via |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
19 | [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. |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
20 | |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
21 | ## Installation |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
22 | |
24 | 23 | You need to install [Lua 5.3][Lua] and [LuaFileSystem][], e.g. using |
24 | [LuaRocks][]): | |
25 | ```sh | |
26 | $ luarocks install luafilesystem | |
27 | ``` | |
21
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
28 | To use [markdown-it][], you need to install [NodeJS][] and then execute `npm install` to install in the top directory of this project. |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
29 | |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
30 | ## License |
16 | 31 | |
32 | Aside from the included `compat_env.lua` and the ltp engine (which is has not | |
11 | 33 | updated to Lua 5.3, and requires on the compat_env module), the code is in |
34 | the public domain. | |
21
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
35 | |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
36 | [KaTeX]: https://katex.org/ |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
37 | [markdown-it]: https://github.com/markdown-it/markdown-it |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
38 | [Pandoc]: https://pandoc.org/ |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
39 | [Lua]: http://www.lua.org/ |
3c71c525cec2
Use markdown-it as default markdown parser.
Tuomo Valkonen <tuomov@iki.fi>
parents:
19
diff
changeset
|
40 | [NodeJS]: https://nodejs.org/en/ |
24 | 41 | [LuaRocks]: https://luarocks.org/ |
42 | [LuaFileSystem]: http://keplerproject.github.io/luafilesystem/ |