Files
paige-hugo/layouts/_default/_markup/render-link.html
2025-02-06 21:42:51 -08:00

8 lines
432 B
HTML

{{- $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) "" -}}
{{- $targetAttr := cond ($targetValue | not | not) (printf ` target="%s"` $targetValue) "" -}}
{{- printf `<a%s%s%s>%s</a>` $href $targetAttr $title .Text | safeHTML -}}