Skip to content

illikainen/luoda

Repository files navigation

Build Coverage

luoda

About

luoda is a plugin-based static site generator. It ships with the following plugins:

  • org - Reads org-mode files with emacs 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 - Retrieves author and date from git repositories with dulwich. It also sets mtime.
  • 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.

Usage

To build the site:

$ luoda build

Configuration

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.

About

Static site generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published