diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 572133fc..fb124818 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,7 +1,4 @@ -{{- $href := cond (.Destination | not | not) (printf ` href="%s"` .Destination) "" -}} -{{- $targetValue := partial "paige/func-target.html" (dict "page" .Page "url" .Destination) -}} -{{- $title := cond (.Title | not | not) (printf ` title="%s"` .Title) "" -}} +{{- $external := cond (urls.Parse .Destination).IsAbs (not (strings.HasSuffix .Destination site.BaseURL)) false -}} +{{- $target := partial "paige/func-target.html" (dict "page" .Page "url" .Destination) -}} -{{- $targetAttr := cond ($targetValue | not | not) (printf ` target="%s"` $targetValue) "" -}} - -{{- printf `%s` $href $targetAttr $title .Text | safeHTML -}} +{{ .Text }}