mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 05:36:07 +01:00
This means that people appreciating my posts on other platforms get a single clap per interaction type (eg. comment or star or repost etc.)
8 lines
301 B
Text
8 lines
301 B
Text
{{- $interactionIndex := (split .Path "/") | after 1 -}}
|
|
{{- $interactionCount := 0 -}}
|
|
{{- if gt (len $interactionIndex) 1 -}}
|
|
{{- with (index site.Data.interactions $interactionIndex) -}}
|
|
{{- $interactionCount = len .interactions -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- return $interactionCount -}}
|