website-theme/layouts/partials/reading_time.html

8 lines
187 B
HTML
Raw Normal View History

2022-05-08 22:02:35 +00:00
<!-- Reading Time -->
{{ $readTime := mul (div (countwords .Content) 220.0) 60 }}
{{ if gt $readTime 60 }}
<p>
Reading Time:
{{ math.Ceil (div $readTime 60) }} minutes.
</p>
{{ end }}