mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-17 09:47:05 +01:00
Revert "Revert "layouts: Add imageConfig to set height and width""
This reverts commit 5e1b0f40ab
.
This commit is contained in:
parent
5e1b0f40ab
commit
3b3598960c
@ -10,7 +10,11 @@
|
|||||||
{{- with .Params.images -}}{{ range first 1 . }}
|
{{- with .Params.images -}}{{ range first 1 . }}
|
||||||
"image": {
|
"image": {
|
||||||
"@type": "ImageObject",
|
"@type": "ImageObject",
|
||||||
"url": "{{ . | absURL }}"
|
"url": "{{ . | absURL }}",
|
||||||
|
{{ with (imageConfig (printf "/static/%s" .)) }}
|
||||||
|
"height": "{{ .Height }}",
|
||||||
|
"width": "{{ .Width }}"
|
||||||
|
{{ end }}
|
||||||
},
|
},
|
||||||
{{- end -}}{{ end }}
|
{{- end -}}{{ end }}
|
||||||
"url": "{{ printf "%s" .Permalink }}",
|
"url": "{{ printf "%s" .Permalink }}",
|
||||||
|
Loading…
Reference in New Issue
Block a user