Trimou
Mustache/handlebars templating engine in Java.
Install / Use
/learn @trimou/TrimouREADME
Trimou - Trim Your Mustache Templates!
Trimou is a templating engine. It's a Mustache implementation but 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, JSON Processing Object Model API (JSR 353), Spring MVC, Dropwizard and EL 3.0.
Get Started
All the artifacts are available in the Maven Central Repository:
<dependency>
<groupId>org.trimou</groupId>
<artifactId>trimou-core</artifactId>
<version>${version.trimou}</version>
</dependency>
Use the MustacheEngineBuilder to build a MustacheEngine - a central point for template management.
// Build the engine - don't configure anything but use sensible defaults
MustacheEngine engine = MustacheEngineBuilder.newBuilder().build();
// Compile the template - no caching and no template locators used
Mustache mustache = engine.compileMustache("Hello {{this}}!");
// Render "Hello world!"
System.out.println(mustache.render("world"));
Examples
- a really simple example
- a little bit more complex web application example.
- a small example using Spring Boot auto-configuration
Building Trimou
Simply run:
$ mvn clean install
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
