I tried to access .GitInfo information for those files {{ range $files }} {{ .GitInfo.AuthorName }} {{ end }}
but I get an error
can’t evaluate field GitInfo in type os.FileInfo
My reason for wanting to do this is to display a list of images used on a documentation site in date order to see if older screenshots need refreshing. Showing Git info alongside the image would be useful.
It looks like .GitInfo can only be used for content pages. Is there another way to achieve this?
Haven’t tried it but you might be able to make a manifest for those images in data, and then parse that. Before we had the GitInfo we had to do it manually. You might be able to adapt something like this, which uses a one liner script to grab git info from the git repo log.