Skip to content

Instantly share code, notes, and snippets.

@Dykam
Created December 20, 2010 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dykam/749167 to your computer and use it in GitHub Desktop.
Save Dykam/749167 to your computer and use it in GitHub Desktop.
Html templates, my way
<html>
<head>
<title>Template</title>
</head>
<body>
<div class="Content">
<h1>Post Title</h1>
<p class="Item"></p>
<p class="Author"></p>
</div>
</body>
</html>
{
"title": "The Template Engine"
".Content": [
{
"h1": "First entry"
".Item": "This is the content of the first entry.",
".Author": "Dykam",
},
{
"h1": "Second entry"
".Item": [
"This is the content of the second entry.",
"With multiple paragraphs!"
],
".Author": "Dykam",
}
],
}
<html>
<head>
<title>The Template Engine</title>
</head>
<body>
<div class="Content">
<h1>First entry</h1>
<p class="Item">This is the content of the first entry.</p>
<p class="Author">Dykam</p>
</div>
<div class="Content">
<h1>Second entry</h1>
<p class="Item">This is the content of the second entry.</p>
<p class="Item">With multiple paragraphs!</p>
<p class="Author">Dykam</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment