html
<html>
<head>
<title>${title}</title>
</head>
<body>
<h1>${heading}</h1>
<p>${content}</p>
</body>
</html>
import org.codecop.templates.snippetory.HtmlTemplate;
public class SnippetoryExample {
public static void main(String[] args) {
HtmlTemplate template = new HtmlTemplate();
template.set("title", "Snippetory Demo");
template.set("heading", "Welcome to Snippetory");
template.set("content", "This is a demo of Snippetory template engine.");
String output = template.toString();
System.out.println(output);
}
}
html
<html>
<head>
<title>Snippetory Demo</title>
</head>
<body>
<h1>Welcome to Snippetory</h1>
<p>This is a demo of Snippetory template engine.</p>
</body>
</html>