html
<!DOCTYPE html>
<html>
<head>
<title>Welcome</title>
</head>
<body>
<h1>Welcome, ${name}!</h1>
</body>
</html>
import org.codecop.snippetory.Template;
import org.codecop.snippetory.TemplateLoader;
public class SnippetoryExample {
public static void main(String[] args) {
TemplateLoader loader = TemplateLoader.fileSystem("path/to/templates");
Template template = loader.get("template.html");
template.set("name", "John Doe");
String result = template.toString();
System.out.println(result);
}
}
html
<!DOCTYPE html>
<html>
<head>
<title>Welcome</title>
</head>
<body>
<h1>Welcome, John Doe!</h1>
</body>
</html>