{{ $s := newScratch }} {{ $s.Set "file" (.Get 0) }} {{ if not ( path.Ext ($s.Get "file")) }} {{ $s.Set "file" (print ($s.Get "file") ".md") }} {{ end }} {{ if not ( fileExists ($s.Get "file")) }} {{ $s.Set "file" (print ( .Site.Params.extraContentDir | default "content_common") "/" ($s.Get "file")) }} {{ end }}