page banner

Grain Framework

Groovy | GPars | Guice

grain.png project preview

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

Live Preview

The live preview makes it possible to change the code and see the updates on the fly. Grain instantly reloads any changes made to the website content and saves time on implementing styles and layouts.

Embedded Code Processing

Grain allows you to pass custom preferences to website pages and perform dynamic modifications of resources by executing the 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 projects. The built-in tags designed for combining page components will help you keep your templates DRY and readable.

Variety of Supported Markups

Grain supports Markdown, RST, and AsciiDoc: TxtMark and PegDown markdown processors are used for rendering Markdown; Python Docutils for RST; and Ruby Asciidoctor for AsciiDoc.

Gradle Plugin

Thanks to the Gradle plugin, it's easy to integrate any Grain theme with a Gradle project and build a 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, and it has a large number of website templates to play with.