website-theme/layouts/partials/reading_time.html

9 lines
No EOL
219 B
HTML

<!-- Reading Time -->
{{ $readTime := mul (div (countwords .Content) 220.0) 60 }}
{{ if gt $readTime 60 }}
<p>
<i class="fas fa-stopwatch"></i>
{{ math.Ceil (div $readTime 60) }} minute
reading time
</p>
{{ end }}