Try anything as a resource, and fall back if not available
This commit is contained in:
parent
b0bfaef7d2
commit
a3ca551b5e
1 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
||||||
{{ $destination := .Destination }}
|
{{ $destination := .Destination }}
|
||||||
|
|
||||||
{{ if not (hasPrefix .Destination "http") }}
|
{{ $resource := .Page.Resources.GetMatch $destination }}
|
||||||
{{ $resource := .Page.Resources.GetMatch $destination }}
|
|
||||||
|
{{ if $resource }}
|
||||||
{{ $destination = ($resource.Resize "1500x").RelPermalink }}
|
{{ $destination = ($resource.Resize "1500x").RelPermalink }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue