{{ $icon := .Get "icon" -}} {{ $image := .Get "image" -}} {{ $title := .Get "title" -}} {{ $url := .Get "url" -}} {{ $anchor := partial "hooks/render-link.html" (dict "ctx" (dict "Destination" $url "PageInner" .Page "Text" $title)) -}}
{{- if $image -}}
{{ $title }}
{{- else if $icon -}}
{{- $iconPath := printf "iconography/32x32/%s.svg" $icon -}} {{- $iconResource := resources.Get $iconPath -}} {{- if $iconResource -}} {{ $iconResource.Content | safeHTML }} {{- else -}} {{/* Fallback to Font Awesome if no SVG found */}} {{- end -}}
{{- end -}}

{{- $anchor -}}

{{ .Inner | .Page.RenderString }}