* feat: use images.AutoOrient in `helper/image` closes https://github.com/CaiJimmy/hugo-theme-stack/issues/1292 * fix: check if IsImageResourceProcessable before using filter * remove local field * feat: add configurable image auto-orientation via a new `autoOrient` parameter in site configuration
15 lines
499 B
JSON
15 lines
499 B
JSON
{{- $pages := partial "helper/pages.html" .Site.Home -}}
|
|
{{- $result := slice -}}
|
|
|
|
{{- range $pages -}}
|
|
{{- $data := dict "title" .Title "date" .Date "permalink" .RelPermalink "content" (.Plain) -}}
|
|
|
|
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources "Context" .) -}}
|
|
{{- if $image -}}
|
|
{{- $data = merge $data (dict "image" $image.Permalink) -}}
|
|
{{- end -}}
|
|
|
|
{{- $result = $result | append $data -}}
|
|
{{- end -}}
|
|
|
|
{{ jsonify $result }} |