Format
parent
4e030066f0
commit
de0f896432
@ -1,6 +1,9 @@
|
|||||||
{{ $external := false }}
|
{{ $external := false }}
|
||||||
|
|
||||||
{{ if (urls.Parse .Destination).IsAbs }}
|
{{ if (urls.Parse .Destination).IsAbs }}
|
||||||
{{ $external = not (strings.HasSuffix .Destination site.BaseURL) }}
|
{{ $external = not (strings.HasSuffix .Destination site.BaseURL) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $newtab := and $external site.Params.paige.external_link_new_tab }}
|
{{ $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>
|
<a {{ with .Destination }} href="{{ . }}" {{ end }} {{ if $newtab }} target="_blank" {{ end }} {{ with .Title }} title="{{ . }}" {{ end }}>{{ .Text }}</a>
|
||||||
|
Loading…
Reference in New Issue