Skip to content
forked from trimou/trimou

Mustache/handlebars template engine implementation written in Java.

Notifications You must be signed in to change notification settings

kdubb-labs/trimou

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trimou - Trim Your Mustache Templates!

Trimou site Travis CI Build Status Maven Central Gitter

Trimou is a Mustache implementation written in Java. Helpers API inspired by Handlebars.js is also supported. The goal is to provide a simple to use and easy to extend templating engine for any Java SE or Java EE application.

There are some ready-to-use extensions which provide integration with CDI, Servlets, PrettyTime, HtmlCompressor, google-gson, Spring MVC and Dropwizard.

Get Started

All the artifacts are available in the Maven Central Repository:

<dependency>
  <groupId>org.trimou</groupId>
  <artifactId>trimou-core</artifactId>
  <version>1.8.2.Final</version>
</dependency>

And now use the MustacheEngine to compile a Mustache template and render the output:

// We don't configure anything - use sensible defaults
MustacheEngine engine = MustacheEngineBuilder.newBuilder().build();
// We provide the template contents - no caching and no template locators used
Mustache mustache = engine.compileMustache("hello", "Hello {{this}}!");
// Renders "Hello world!"
System.out.println(mustache.render("world"));

Examples

Building Trimou

Simply run:

$ mvn clean install

Microbenchmarks

Example results

See also https://github.com/trimou/trimou-benchmarks

About

Mustache/handlebars template engine implementation written in Java.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%