Objective
I want to list file in directory and get param of this file to make a thumbnail of description and main image
Problem
I have some issue to get param of file in directory
I write this code
{{- $files := readDir "content" -}}
{{- range $files }}
{{- with .GetPage $.Name }}{{ .Param "description" }}{{end}}
{{ end }}
And I get the following error
executing "index.html" at <.GetPage>: can't evaluate field GetPage in type os.FileInfo
Can you help me ?