hello i found a slice of type Images in Pages struct, how can i use that from a single.html
i tried {{ range .Images}} {{.URL}} {{ end }}
any advise on that
hello i found a slice of type Images in Pages struct, how can i use that from a single.html
i tried {{ range .Images}} {{.URL}} {{ end }}
any advise on that
A snippet from a new social partials included in Hugo (shows first 6), https://github.com/spf13/hugo/blob/edcdb6f49ce57f79e6faede661a9c61a8d21eab7/tpl/template_embedded.go#L105
{{ with .Params.images }}{{ range first 6 . }}
<meta property="og:image" content="{{ . }}" />
{{ end }}{{ end }}
Well that is Params.Images i dont see that reside in the page struct
see https://github.com/spf13/hugo/blob/02da49597dce2e8206495eb3f778b22126ca6724/hugolib/page.go#L38
it holds a var images of type []image which is defined in
hugolib/media.go#L18
so how is this slice being loaded with images