Skip to content

Instantly share code, notes, and snippets.

@tjerman
Created Feb 17, 2022
Embed
What would you like to do?
Email template
{
"variables": {
"param1": "value1",
"param2": {
"nestedParam1": "value2"
},
"things": [
"thing 1",
"thing 2",
"thing 3",
"thing 4",
"thing 5",
"thing 6"
]
},
"options": {
"documentSize": "A4",
"contentScale": "1",
"orientation": "portrait",
"margin": "0.3"
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Title</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
</head>
<body>
<h1>Hello, world!</h1>
<table>
<tr>
<th>#</th><th>thing</th>
</tr>
{{range $index, $element := .things}}
<tr>
<td>{{ $index }}</td>
<td>{{ $element }}</td>
</tr>
{{end}}
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment