hackertours-theme/layouts/markup_examples/render-link.html

2 lines
241 B
HTML

<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}</a>
{{- /* chomp trailing newline */ -}}