1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-17 17:57:04 +01:00

Revert "layouts: Add imageConfig to set height and width"

This reverts commit bf9bca9656.

If the user specifies a non-local image then the build generates
an error. See #56. We need to have a way to only get imageInfo for
local images...
This commit is contained in:
Alan Orth 2017-03-24 11:04:38 +02:00
parent 2e6a27300e
commit 5e1b0f40ab

View File

@ -10,11 +10,7 @@
{{- 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 }}",