{{ partial "header.html" . }}

{{if not .IsHome }}
<h1>{{ .Title | markdownify }}</h1>
{{ end }}

{{ .Content }}

{{ $pages := .Pages }}
{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }}
{{ range $index, $page := (where $pages "Section" "!=" "") }}
<div class="post">
  <h3><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></h3>
  <span class="date">Written on {{ .Date.Format "2006/01/02" }}</span>
  <p>{{ .Summary }}</p>
</div>
{{ if not (eq $index (sub (len $pages) 1)) }}
<hr>
{{ end }}
{{ end }}
{{ partial "footer.html" . }}
