{{ $url := .Destination }} {{ if eq hugo.Environment "staging" }} {{ $imageFile := index (split .Destination "#") 0 }} {{ $imageResource := .Page.Resources.GetMatch ($imageFile) }} {{ with $imageResource }} {{ $url = .RelPermalink }} {{ end }} {{ end }} {{ if .Title }}
{{ .Text }}
{{ .Title | safeHTML | markdownify }}
{{ else }} {{ .Text }} {{ end }}