javalin / javalin-rendering

Artifact/module for server-side template/markdown rendering in Javalin: https://javalin.io/plugins/rendering
Apache License 2.0
10 stars 7 forks source link

Chat at https://discord.gg/sgak4e5NKv CI License Maven

About Javalin

Javalin rendering

The javalin-rendering artifact is an optional module for the Javalin web framework that provides a simple way to render HTML using popular template engines. The javalin-rendering artifact includes default implementations for several template engines, including JTE, Mustache, Velocity, Pebble, Handlebars, and Thymeleaf.

DOCS: https://javalin.io/plugins/rendering

Add dependency

Maven

<dependency>
    <groupId>io.javalin</groupId>
    <artifactId>javalin-rendering</artifactId>
    <version>5.4.2</version>
</dependency>

Gradle

implementation "io.javalin:javalin-rendering:5.4.2"

Usage

Once you have included the javalin-rendering artifact and one of the supported template engine dependencies in your project, Context#render should automatically render your templates. By default, the plugin will look in src/main/resources/templates for template files.