feat: add remote image support
This commit is contained in:
parent
96ec7cbcf4
commit
7123e6dfae
|
@ -1,4 +1,9 @@
|
||||||
{{ $image := .Page.Resources.GetMatch .Destination -}}
|
{{ $image := "" -}}
|
||||||
|
{{ if (urls.Parse .Destination).IsAbs }}
|
||||||
|
{{ $image = resources.GetRemote .Destination -}}
|
||||||
|
{{ else -}}
|
||||||
|
{{ $image = .Page.Resources.GetMatch .Destination -}}
|
||||||
|
{{ end -}}
|
||||||
{{ with $image -}}
|
{{ with $image -}}
|
||||||
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
|
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue