README.md

Fri, 17 Jul 2020 10:00:47 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Fri, 17 Jul 2020 10:00:47 -0500
changeset 30
3ac53da03439
parent 24
4013d2901832
permissions
-rw-r--r--

Support loading TEMPLATE_PATH/katex_config.json.

18
30b9b7402f94 Add title
Tuomo Valkonen <tuomov@iki.fi>
parents: 16
diff changeset
1
30b9b7402f94 Add title
Tuomo Valkonen <tuomov@iki.fi>
parents: 16
diff changeset
2 # lgen
11
d2c95c18f88f Added a README
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
3
d2c95c18f88f Added a README
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
d2c95c18f88f Added a README
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
6
d2c95c18f88f Added a README
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
7 It is not particularly supported or maintained; it was created back in 2009
13
5886bf51708b README typofixes etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 12
diff changeset
8 to build [my own website](http://tuomov.iki.fi/). The engine is still being
16
e377590e9b19 Support Pandoc rendering
Tuomo Valkonen <tuomov@iki.fi>
parents: 13
diff changeset
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
d2c95c18f88f Added a README
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
e377590e9b19 Support Pandoc rendering
Tuomo Valkonen <tuomov@iki.fi>
parents: 13
diff changeset
15
19
d0b9a9c90832 Avoid escape in README
Tuomo Valkonen <tuomov@iki.fi>
parents: 18
diff changeset
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
4013d2901832 Document LFS installation
Tuomo Valkonen <tuomov@iki.fi>
parents: 21
diff changeset
23 You need to install [Lua 5.3][Lua] and [LuaFileSystem][], e.g. using
4013d2901832 Document LFS installation
Tuomo Valkonen <tuomov@iki.fi>
parents: 21
diff changeset
24 [LuaRocks][]):
4013d2901832 Document LFS installation
Tuomo Valkonen <tuomov@iki.fi>
parents: 21
diff changeset
25 ```sh
4013d2901832 Document LFS installation
Tuomo Valkonen <tuomov@iki.fi>
parents: 21
diff changeset
26 $ luarocks install luafilesystem
4013d2901832 Document LFS installation
Tuomo Valkonen <tuomov@iki.fi>
parents: 21
diff changeset
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
e377590e9b19 Support Pandoc rendering
Tuomo Valkonen <tuomov@iki.fi>
parents: 13
diff changeset
31
e377590e9b19 Support Pandoc rendering
Tuomo Valkonen <tuomov@iki.fi>
parents: 13
diff changeset
32 Aside from the included `compat_env.lua` and the ltp engine (which is has not
11
d2c95c18f88f Added a README
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
33 updated to Lua 5.3, and requires on the compat_env module), the code is in
d2c95c18f88f Added a README
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
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
4013d2901832 Document LFS installation
Tuomo Valkonen <tuomov@iki.fi>
parents: 21
diff changeset
41 [LuaRocks]: https://luarocks.org/
4013d2901832 Document LFS installation
Tuomo Valkonen <tuomov@iki.fi>
parents: 21
diff changeset
42 [LuaFileSystem]: http://keplerproject.github.io/luafilesystem/

mercurial