{"id":28112542,"url":"https://github.com/trimou/trimou","last_synced_at":"2025-05-14T05:04:18.657Z","repository":{"id":8466094,"uuid":"10064418","full_name":"trimou/trimou","owner":"trimou","description":"Mustache/handlebars templating engine in Java.","archived":false,"fork":false,"pushed_at":"2023-10-10T21:19:55.000Z","size":2400,"stargazers_count":79,"open_issues_count":12,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-03-27T05:17:45.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.trimou.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trimou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-14T20:39:22.000Z","updated_at":"2023-11-20T14:16:42.000Z","dependencies_parsed_at":"2022-09-05T11:10:32.355Z","dependency_job_id":null,"html_url":"https://github.com/trimou/trimou","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimou%2Ftrimou","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimou%2Ftrimou/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimou%2Ftrimou/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimou%2Ftrimou/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trimou","download_url":"https://codeload.github.com/trimou/trimou/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076839,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-14T05:01:12.427Z","updated_at":"2025-05-14T05:04:18.650Z","avatar_url":"https://github.com/trimou.png","language":"Java","funding_links":[],"categories":["模板引擎"],"sub_categories":[],"readme":"# Trimou - Trim Your Mustache Templates!\n\n[![Trimou site](https://img.shields.io/badge/www-trimou.org-orange.svg)](http://trimou.org/)\n[![Maven Central](http://img.shields.io/maven-central/v/org.trimou/trimou-core.svg)](http://search.maven.org/#search|ga|1|trimou-core)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/trimou/trimou)\n[![License](https://img.shields.io/badge/license-Apache%20License%202.0-yellow.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n\nTrimou is a templating engine.\nIt's a [Mustache](https://github.com/mustache) implementation but **Helpers API** inspired by [Handlebars.js](http://handlebarsjs.com/) is also supported.\nThe goal is to provide a simple to use and easy to extend templating engine for any Java SE or Java EE application.\n\nThere are some ready-to-use extensions which provide integration with [CDI](http://www.cdi-spec.org/), Servlets, [PrettyTime](http://ocpsoft.org/prettytime/),  [HtmlCompressor](http://code.google.com/p/htmlcompressor/), [google-gson](http://code.google.com/p/google-gson/), [JSON Processing Object Model API (JSR 353)](https://jsonp.java.net/), [Spring MVC](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html), [Dropwizard](https://dropwizard.github.io/dropwizard/) and [EL 3.0](https://uel.java.net/).\n\n## Get Started\n\nAll the artifacts are available in the Maven Central Repository:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.trimou\u003c/groupId\u003e\n  \u003cartifactId\u003etrimou-core\u003c/artifactId\u003e\n  \u003cversion\u003e${version.trimou}\u003c/version\u003e\n\u003c/dependency\u003e\n```\nUse the `MustacheEngineBuilder` to build a `MustacheEngine` - a central point for template management.\n\n```java\n// Build the engine - don't configure anything but use sensible defaults\nMustacheEngine engine = MustacheEngineBuilder.newBuilder().build();\n// Compile the template - no caching and no template locators used\nMustache mustache = engine.compileMustache(\"Hello {{this}}!\");\n// Render \"Hello world!\"\nSystem.out.println(mustache.render(\"world\"));\n```\n\n## Examples\n\n* a really [simple example](https://github.com/trimou/trimou/tree/master/examples/simple)\n* a little bit more complex [web application example](https://github.com/trimou/trimou/tree/master/examples/ping).\n* a small example using [Spring Boot auto-configuration](https://github.com/trimou/trimou/tree/master/examples/spring-boot)\n\n## Building Trimou\n\nSimply run:\n\n\u003e $ mvn clean install\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrimou%2Ftrimou","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrimou%2Ftrimou","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrimou%2Ftrimou/lists"}