{{ define "main" }}

			{{ "<!-- Main -->" | safeHTML }}
				<section id="main" class="container">
					<header>
						<h2>{{ if .Draft }}DRAFT: {{end}}{{ .Params.title }}</h2>
						{{ with .Params.subtitle }}<p>{{ . }}</p>{{ end }}
					</header>
					<div class="box">
						{{ with .Params.images }}
							<span class="image featured"><img src="{{ index . 0 | absURL }}" alt=""></span>
						{{ end }}
						{{ .Content }}
						{{ if or .Params.tags .Params.date }}
							<hr />
							<div id="meta">
							{{ with .Params.tags }}
								<p>Tags:
									{{ range $index, $key:= . }}
										{{ if $index }}, {{ end }}
										{{ if gt (len $key) 0 }}
								  		<a href="/tags/{{$key | urlize }}/">#{{ $key }}</a>
										{{ end }} {{/* if gt len */}}
									{{ end }} {{/* range */}}
							  </p>
							{{ end }} {{/* if tags */}}
							{{ with .Params.date }}<p class="meta">Published: {{ . | dateFormat "January 2, 2006"}}</p>{{ end }}
							</div>
						{{ end }} {{/* if meta */}}
					</div>
				</section>
{{ end }}
