{{ $content := .content }} {{ $words := len (split $content " ") }} {{ $wpm := 180 }} {{ $min_time := 1 }} {{ $read_time := div $words $wpm }} {{ if lt $read_time 1 }} {{ $read_time = $min_time }} {{ end }} {{ $lang := .lang | default site.Language.Lang }} {{ $read_prompt := i18n "post.read_time.prompt" (dict "Language" $lang) }} {{- $read_time -}} {{ " " }} {{- i18n "post.read_time.unit" (dict "Language" $lang) -}} {{- if .prompt -}} {{- $prompt_words := len (split $read_prompt " ") -}} {{- if le $prompt_words 1 -}}{{ " " }}{{- end -}} {{ $read_prompt }} {{- end -}}