Skip to content

Instantly share code, notes, and snippets.

@Cartmanishere
Last active June 11, 2021 15:32
Show Gist options
  • Save Cartmanishere/cd9d536e0db759ca2dfae79fd5c1455d to your computer and use it in GitHub Desktop.
Save Cartmanishere/cd9d536e0db759ca2dfae79fd5c1455d to your computer and use it in GitHub Desktop.
// Initialize the loader using a prefix
TemplateLoader loader = new HTTPTemplateLoader("https://bucket-name.s3.Region.amazonaws.com/");
Handlebars handlebars = new Handlebars(loader);
Template template = handlebars.compile("index");
Map<String, String> data = new HashMap<>();
data.put("name", "John");
System.out.println(template.apply(data));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment