{{ define "main" }}
{{- $images := partial "photostream/image-resources.html" . -}} {{- if eq (len $images) 0 -}} {{ errorf "Missing photo from photos page %q" .Path }} {{- end -}} {{ if eq (len $images) 1 }} {{- $img := index $images 0 -}}
{{ . }}
{{ .Content -}} {{- if .Params.photo_details | default .Params.photoDetails | default true -}} {{- partial "photostream/exif_table.html" $img.Exif -}} {{- end -}} {{ end }}{{/* if eq (len $images) 1 */}}
{{ end }}