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

{{ if eq $pagesLen 0 }}
<p>It sure is quiet around here.</p>
{{ end }}

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