{{ $href := .href }} {{ $path := false }} {{ if eq $href (urls.Parse $href).Path }} {{ $path = true }} {{ with resources.Get (relLangURL $href) }} {{ $href = (. | minify | fingerprint).RelPermalink }} {{ else }} {{ $href = relLangURL $href }} {{ end }} {{ end }}