aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/polaris/layouts/partials/posts.html
blob: f641d165073cdaa7cbfc06677dbc8dac8ce0ebfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{ $pages := where site.RegularPages "Section" "blog" }}
{{ $pagesLen := (len $pages) }}

{{ if eq $pagesLen 0 }}
<p>There's nothing here!</p>
{{ end }}

{{ range $index, $element := $pages }}
<ul>
  <li><a href = "{{ .Permalink }}">{{ .Title }}</a> ({{ .Date | time.Format "Jan 02 2006" }})</li>
</ul>
  {{ if ne (add $index 1) $pagesLen }}
<hr>
  {{ end }}
{{ end }}