{{- $source := ($.Page.Resources.ByType "audio").GetMatch (printf "%s" (.Get "name")) }} {{- $customAlt := .Get "alt" }} {{- with $source }} {{- $caption := default .Title $customAlt }}
{{- with $caption }}
{{ . }} {{- with $source.Params.credits }} {{ printf " (%s)" . | $.Page.RenderString }} {{- end }}
{{- end }}
{{- end }}