{{ .Date.Format "2006-01-02" }}
{{ if .Title }}

{{ .Title }}

{{ end }}
{{ .Content }}
{{/* Determine background audio for this page: prefer page resources, then section subfolder */}} {{ $folder := path.Base (printf "%s" .File.Dir) }} {{ $paudios := .Resources.Match "*.{mp3,m4a,ogg,wav,opus,OPUS,OGG,WAV,MP3,M4A}" }} {{ $audio := index $paudios 0 }} {{ if not $audio }} {{ $secAudios := .CurrentSection.Resources.Match (printf "**/%s/*.{mp3,m4a,ogg,wav,opus,OPUS,OGG,WAV,MP3,M4A}" $folder) }} {{ $audio = index $secAudios 0 }} {{ end }} {{ with $audio }}
{{ end }}