luoda
is a plugin-based static site generator. It ships with the
following plugins:
org
- Reads org-mode files withemacs
if it's installed. Code blocks are highlighted with pygments.markdown
- Reads markdown files with mistune. Code blocks are highlighted with pygments.static
- Reads files as-is.metadata
- Retrievesauthor
anddate
from git repositories with dulwich. It also setsmtime
.render
- Renders parsed content with the jinja2 template engine.minimize
- Minimize rendered HTML content with htmlmin.write
- Writes content to disk.tap
- Helper that prints the current state.
To build the site:
$ luoda build
A simple configuration file looks as follows:
[build]
# Required: source directory for jinja2 templates.
template-dir = "templates"
# Required: top-level directory for the collections to build.
collection-dir = "collections"
# Optional: output directory.
build-dir = "build"
# Required: plugins to use. Order is important!
plugins = [
"metadata",
"markdown",
"org",
"static",
"render",
"minimize",
"write"
]
[[collection]]
# Required: name of the collection
name = "blog-posts"
# Optional: name of the template to use. Files are read as-is if no
# template is provided and if the `static` module is enabled.
template = "post.html"
# Required: list of globs to include for this collection, relative to
# collection-dir
paths = ["blog/**.md"]
# Optional: list of globs to exclude from `paths`, relative to
# collection-dir
ignore-paths = ["blog/index.md"]
[[collection]]
# Required: name of the collection
name = "blog-index"
# Optional: name of the template to use. Files are read as-is if no
# template is provided and if the `static` module is enabled.
template = "list.html"
# Required: list of globs to include for this collection, relative to
# collection-dir
paths = ["blog/index.md"]
Note that arbitrary key=value
pairs may also be specified for
consumption by the templates.