Add external_link_new_tab param
parent
8381f5d96b
commit
7282c89d2b
@ -0,0 +1,6 @@
|
||||
{{ $external := false }}
|
||||
{{ if (urls.Parse .Destination).IsAbs }}
|
||||
{{ $external = not (strings.HasSuffix .Destination site.BaseURL) }}
|
||||
{{ end }}
|
||||
{{ $newtab := and $external site.Params.paige.external_link_new_tab }}
|
||||
<a {{ with .Destination }} href="{{ . }}" {{ end }} {{ if $newtab }} target="_blank" {{ end }} {{ with .Title }} title="{{ . }}" {{ end }}>{{ .Text }}</a>
|
Loading…
Reference in New Issue