Files
site/themes/custom-theme/layouts/_default/_markup/render-link.html
Dave Gallant 8d898eb69a Tweak theme
2024-04-07 21:55:42 -04:00

14 lines
323 B
HTML

{{- $isExternal := strings.HasPrefix .Destination "http" -}}
<a
href="{{ .Destination | safeURL }}"
{{ with .Title }}
title="{{ . }}"
{{ end }}
{{ if $isExternal }}
class="link--external" target="_blank" rel="noreferrer"
{{ end }}
>
{{- .Text | safeHTML -}}
</a>
{{- /* Trimm trailing whitespace */ -}}