{{ $src := .Get "src" }} {{ $alt := .Get "alt" }} {{ $title := .Get "title" }} {{ if and (eq .Page.Kind "page") (not (hasPrefix $src "/")) }} {{ $src = (printf "../%s" $src) }} {{ end }} {{ $alt }}