aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/_default/_markup/render-link.html
blob: 7031af35043f8bac1905a472ffeb30ce239cdee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
{{- /* A Hugo Markdown render hook to parse links, opening external links in new tabs. */ -}}
<a
  href="{{ .Destination | safeURL }}"
  {{ with .Title }}
    title="{{ . }}"
  {{ end }}
  {{ if strings.HasPrefix .Destination "http" }}
    target="_blank" rel="noopener"
  {{ end }}
  >{{ .Text | safeHTML }}</a
>