{{- $file := .Get "file" -}} {{- $key := .Get "key" -}} {{- $type := .Get "type" -}} {{- if eq $type "count" -}} {{- if $key -}} {{- (index .Site.Data $file $key) | len -}} {{- else -}} {{- (index .Site.Data $file) | len -}} {{- end -}} {{- else -}} {{- index .Site.Data $file $key -}} {{- end -}}