1
Fork 0

Try anything as a resource, and fall back if not available

This commit is contained in:
Jake Howard 2020-12-01 19:29:51 +00:00
parent b0bfaef7d2
commit a3ca551b5e
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -1,7 +1,8 @@
{{ $destination := .Destination }}
{{ if not (hasPrefix .Destination "http") }}
{{ $resource := .Page.Resources.GetMatch $destination }}
{{ if $resource }}
{{ $destination = ($resource.Resize "1500x").RelPermalink }}
{{ end }}