Fix link rendering, again

This commit is contained in:
Joshua Goins 2023-08-10 18:46:40 -04:00
parent 76149393e7
commit 3ae253586f

View file

@ -1,4 +1,4 @@
{{ $icon := resources.Get "external-link.svg" }} {{ $icon := resources.Get "external-link.svg" }}
<a class="ext-link" href="{{ .Destination | urlize | safeURL }}" {{ if strings.HasPrefix .Destination "http" }} <a class="ext-link" href="{{ .Destination | safeURL }}" {{ if strings.HasPrefix .Destination "http" }}
target="_blank"{{ end }}>{{ .Text | safeHTML }}{{ if strings.HasPrefix .Destination "http" }}<img class="external-link" aria-hidden="true" alt="External link" width="16" height="16" src="{{ $icon.RelPermalink }}">{{- end -}}</a> target="_blank"{{ end }}>{{ .Text | safeHTML }}{{ if strings.HasPrefix .Destination "http" }}<img class="external-link" aria-hidden="true" alt="External link" width="16" height="16" src="{{ $icon.RelPermalink }}">{{- end -}}</a>