mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
13 lines
No EOL
430 B
HTML
13 lines
No EOL
430 B
HTML
{{- $medium := .Get 0 -}}
|
|
{{- $details := dict -}}
|
|
{{- range site.Params.social -}}
|
|
{{- if eq .name $medium -}}
|
|
{{- $details = . -}}
|
|
{{- break -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- with $details -}}
|
|
<a href="{{ .url }}" target="_blank" rel="{{ if .rel }}{{ .rel }}{{ else }}me noopener{{ end }}" title="{{ .name | humanize }}">{{ .name | humanize }}</a>
|
|
{{- else -}}
|
|
{{ errorf "Unknown social: %s" $medium }}
|
|
{{- end -}} |