lua-users home
lua-l archive

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


Hi all,

ldoc is a documentation tool for Lua, which is mostly compatible with
LuaDoc but offers useful features like Markdown rendering of code
comments and readmes, pretty-printing of examples and ability to work
directly with C extension code. Its documentation is of course done
using ldoc itself [2]

You may feed it your own stylesheets and templates, like Graham
Hannington’shandsome documentation for Lua for z/OS [3]

Changes since 1.4.2 are here [0] and the source is at [1]; it is also
available as ldoc with LuaRocks. The only required dependency is
Penlight, although I do recommend getting a more industrial Markdown
plugin like lua-discount (also via LR) since markdown.lua is slow to
render large documents.

Some noteworthy new features are illustrated with Penlight [4] done
with the new `style = "!static"` built-in style sheet, which has a
fixed navigation panel. There is `prettify_files=true` which renders
the actual source and makes line references available from functions.

The llib documentation [5] shows off ldoc in its C documentation mode
[6], but the more important innovation presented here is that code
blocks in the module comments are prettified.

This version kicks off the 1.5 release process. I'm seriously tempted
to pass the CSS through the template engine as well, because
maintaining four different stylesheets with small changes is getting
irritating ;)  The actual HTML templates are little changed in
substance from the original LuaDoc templates, so anybody who has a
sense of modern web design and wants to make documentation look good
for everyone is welcome to revisit the ldoc look 'n feel.

steve d.

[0] https://github.com/stevedonovan/LDoc/blob/master/changes.md
[1] http://stevedonovan.github.com/files/ldoc-1.4.3.zip
[2] http://stevedonovan.github.io/ldoc/manual/doc.md.html
[3] http://lua4z.com/doc/
[4] http://stevedonovan.github.io/Penlight/api/manual/01-introduction.md.html
[5] http://stevedonovan.github.io/llib/modules/obj.html
[6] it's easier to teach your dog new tricks than to get another dog.