Content and build toolchain for Lua by Example, a site that teaches Lua via annotated example programs.
The Lua by Example site is built by extracting code and
comments from source files in examples
and rendering
them via the templates
into a static public
directory. The programs implementing this build process
are in tools
, along with dependencies specified in
the go.mod
file.
The built public
directory can be served by any
static content system. The production site uses github pages.
To build the site you'll need Go and Lua installed. Run:
$ tools/build
To build continuously in a loop:
$ tools/build-loop
To see the site locally:
$ tools/serve
and open http://127.0.0.1:8000/
in your browser.
The site is published via a Github action
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
Thanks to Mark McGranaghan for GoByExample and Jeremy Ashkenas for Docco, both of which inspired this project.