page banner

Grain Framework

Groovy | GPars | Guice

grain.png project preview

Grain is a lightweight, yet powerful, static website generator for Groovy that makes demanding static site implementation intuitive and enjoyable.

Live preview

Live preview to make and see changes on the fly. Grain instantly reloads any changes made to site content and saves time on implementing styles and layouts.

Embedded code processing

Grain allows you to pass custom preferences to site pages and perform dynamic modification of resources by executing embedded Groovy code inside content files and templates.

Resource URL mapping

Resource to URL mapping minimizes the number of templates by allowing you to associate the same page file with different urls, content and preferences.

Templates and in-page tags

Infinite template nesting and tag libraries make Grain suitable for large-sized projects. Built-in tags designed for combining page parts help keep templates DRY and easy to read.

Variety of supported markups

Grain supports Markdown, RST and AsciiDoc markups. TxtMark or PegDown is used for rendering Markdown, Python Docutils for RST, and Ruby Asciidoctor for AsciiDoc.

Gradle plugin

Thanks to the Gradle plugin, it is easy to integrate any Grain theme with a Gradle project and build a project website with up-to-date documentation and source samples.

Ready to launch

Grain comes with themes and examples for an easy start. The framework has been around for a while now, and has a sufficient number of site templates to play and learn with.