Use external link policy for icon URLs
This commit is contained in:
@@ -1,9 +1,3 @@
|
||||
{{ $external := false }}
|
||||
{{ $target := partial "paige/target.html" (dict "page" .Page "url" .Destination) }}
|
||||
|
||||
{{ 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>
|
||||
<a {{ with .Destination }} href="{{ . }}" {{ end }} {{ with $target }} target="{{ . }}" {{ end }} {{ with .Title }} title="{{ . }}" {{ end }}>{{ .Text }}</a>
|
||||
|
Reference in New Issue
Block a user