feat: Add estimated reading time

This commit is contained in:
2025-11-15 22:19:05 +01:00
parent 4d39061e29
commit b9aa4b4ed4
5 changed files with 26 additions and 0 deletions

View File

@@ -4,6 +4,10 @@
{{ if .Date }}
<time>{{ .Date.Format "January 2, 2006" }}</time>
{{ end }}
{{ $readingTime := div (float .WordCount) .Site.Params.reading_speed }}
{{ $readingTime = math.Ceil $readingTime }}
<p class="ettr">{{ i18n "estimated_time_to_read" }}: {{ $readingTime }} {{ i18n "minutes" }}</p>
<div>
<p>
{{ .Content }}