feat: Add estimated reading time
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user