Files
paige-hugo/layouts/_default/_markup/render-link.html
2023-09-24 23:09:08 -07:00

7 lines
411 B
HTML

{{- $href := cond (.Destination | not | not) (printf ` href="%s"` .Destination) "" -}}
{{- $target := partial "paige/target.html" (dict "page" .Page "url" .Destination) -}}
{{- $targetattr := cond ($target | not | not) (printf ` target="%s"` $target) "" -}}
{{- $title := cond (.Title | not | not) (printf ` title="%s"` .Title) "" -}}
{{- printf `<a%s%s%s>%s</a>` $href $targetattr $title .Text | safeHTML -}}