{{ $_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 }} {{T "BinaryPrefix-kilobyte"}})
  • {{end}} {{else}}
  • {{.Name}} ({{div .Size 1024 }} {{T "BinaryPrefix-kilobyte"}})
  • {{end}} {{end}}
    {{.Inner}}