www.byjp.me/layouts/shortcodes/friend.gmi
2024-04-29 17:38:46 +01:00

6 lines
No EOL
167 B
Text

{{ $parts := strings.Split (.Get 0) "." -}}
{{- with index site.Data.friends (index $parts 0) -}}
<a href="{{.site}}">{{.name}}</a>
{{- else -}}
{{ . }}
{{- end }}