{{- $context := .context -}} {{- $position := .block.position -}} {{- $title := .block.title -}} {{- $term := false -}} {{- with .block.data }} {{ if .category }} {{- $term = site.GetPage (printf "/categories%s" .category) -}} {{ end }}
{{ if $title -}}
{{ $title_link := false }} {{- if $term }} {{ $title_link = $term.Permalink }} {{ end -}} {{ partial "blocks/title" (dict "title" $title "context" $context "link" $title_link ) }}
{{- end }}
{{ range $post := .posts -}} {{ with site.GetPage (printf "/posts/%s" $post) }}
{{ partial "posts/post" . }}
{{ end }} {{ end }}
{{ end -}}