{{- $pages := .Pages -}} {{- $context := .Context -}}
{{ range $pages -}} {{ $page := . -}} {{- $coverPath := .Params.cover -}} {{- $img := false -}} {{- if $coverPath -}} {{- if strings.HasSuffix $coverPath ".yaml" -}} {{- $coverAbsPath := printf "%s%s" $page.File.Dir $coverPath -}} {{- $coverRaw := readFile $coverAbsPath -}} {{- $coverData := $coverRaw | transform.Unmarshal -}} {{- with $coverData.file -}} {{- $img = $page.Resources.GetMatch . -}} {{- end -}} {{- else -}} {{- $img = $page.Resources.GetMatch $coverPath -}} {{- end -}} {{- end -}} {{- if $img -}} {{- with $img -}} {{- $resized := .Resize "650x" -}}
{{ with $page.Params.date -}} {{- end }}
{{ end -}} {{- else -}}
{{ with $page.Params.date -}} {{- end }}
{{- end }}

{{ .Title }}

{{ end }}