{{ define "main" }} <content> {{ if .Data.Singular }} <h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3> <small> <a href="{{ "blog" | relURL }}">Remove filter</a> </small> {{ end }} <ul class="blog-posts"> {{ range .Pages }} <li> <span> <i> <time datetime='{{ .Date.Format "2006-01-02" }}'> {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }} </time> </i> </span> <a href="{{ .Permalink }}">{{ .Title }}</a> </li> {{ else }} <li> No posts yet </li> {{ end }} </ul> <small> <div> {{ $currentSection := .Section }} {{ range $tag, $taxonomy := .Site.Taxonomies.tags }} {{ $count:= 0 }} {{ range $taxonomy.Pages }} {{ if eq .Section $currentSection }} {{ $count = add $count 1 }} {{ end }} {{ end }} {{ if gt $count 0 }} <a href="{{ $taxonomy.Page.Permalink }}">#{{ $taxonomy.Page.Title }}</a> {{ end }} {{ end }} </div> </small> </content> {{ end }}