<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello {name}!</h1>
<p>Today is {date}.</p>
</body>
</html>
import com.chunktemplates.ChunkTemplate;
import com.chunktemplates.TemplateContext;
public class HelloWorld {
public static void main(String[] args) {
ChunkTemplate template = new ChunkTemplate("hello_world.ct");
TemplateContext context = new TemplateContext();
context.put("name", "John");
context.put("date", "2022-01-01");
String output = template.render(context);
System.out.println(output);
}
}