Fix link rendering, again
This commit is contained in:
parent
76149393e7
commit
3ae253586f
1 changed files with 2 additions and 2 deletions
|
@ -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>
|
Loading…
Add table
Reference in a new issue