{{ $_hugo_config := `{ "version": 1 }` }}
{{if eq .Page.File.BaseFileName "index"}} {{$.Scratch.Add "filesName" "files"}} {{else}} {{$.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName)}} {{end}}
{{ range (readDir (printf "./content/%s%s" .Page.File.Dir ($.Scratch.Get "filesName")) ) }} {{ $fileDir := replace $.Page.File.Dir "\\" "/" }} {{if ($.Get "pattern")}} {{if (findRE ($.Get "pattern") .Name)}}
  • {{.Name}} ({{div .Size 1024 }} ko)
  • {{end}} {{else}}
  • {{.Name}} ({{div .Size 1024 }} ko)
  • {{end}} {{end}}
    {{.Inner}}