mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 08:15:44 +00:00
fix(render-image): warn with source position on unresolved local images
BREAKING CHANGE: Requires Hugo v0.160
This commit is contained in:
1 parent
ca9888609e
commit
fe1f4d6a23
2 files changed
+4
-1
No files matched your search
@@ -103,7 +103,7 @@ params:
|
||||
address_format: en-us
|
||||
module:
|
||||
hugoVersion:
|
||||
min: "0.158.0"
|
||||
min: "0.160.0"
|
||||
extended: true
|
||||
imports:
|
||||
- path: github.com/HugoBlox/kit/modules/analytics
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
{{- with $img_class }} class="{{.}}"{{end}} />
|
||||
{{- end }}
|
||||
{{- else -}}
|
||||
{{- if not $is_remote -}}
|
||||
{{- warnf "render-image: could not resolve local image %q — %s" $destination .Position -}}
|
||||
{{- end -}}
|
||||
<img src="{{ $destination | safeURL }}" alt="{{ $alt }}" loading="lazy" {{ if $zoom }}data-zoomable{{end}}
|
||||
{{- with $width }} width="{{.}}"{{end}} {{- with $height }} height="{{.}}"{{end}}
|
||||
{{- with $img_class }} class="{{.}}"{{end}} />
|
||||
|
||||
Reference in new issue
Block a user