blob: b3b183945cf9ab708ec148d828f695723f3443b1 (
plain)
1
2
3
4
5
6
7
8
9
10
|
{{- $seconds := mul (div .WordCount 180.0) 60.0 -}}
{{- $seconds = printf "%.0f" $seconds -}}
{{- if eq $seconds "0" -}}
{{- $seconds = "1" -}}
{{- end -}}
<read-time title="Takes {{ $seconds }} second{{- if not (eq $seconds "1") -}}s{{- end }} to read">
{{ $seconds }} sec
</read-time>
|