{{ $img := printf "%s%s" .Page.Site.BaseURL .Destination }} {{ with resources.Get .Destination }} {{ $img = .RelPermalink }} {{ end }} {{ .Text }}