Merge 857633572e818b0113d5d4ba88b865c541b377bf into 3f0b2aa33feefe18b76cb1b64fced8ae800fac5d

This commit is contained in:
D14rn 2025-03-06 00:38:33 +01:00 committed by GitHub
commit c62ba3212c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,7 +46,14 @@
3) A page front matter value is set `show_reading_time = true`
*/}}
{{ if (or (eq (.Param "show_reading_time") true) (eq $section.Params.show_reading_time true) )}}
<span class="f6 mv4 dib tracked"> - {{ i18n "readingTime" .ReadingTime }} </span>
{{ $readingTime := .ReadingTime }}
{{ with .Site.Params.reading_speed }}
{{ $readingTime = div (float $.WordCount) . }}
{{ $readingTime = math.Ceil $readingTime }}
{{ end }}
<span class="f6 mv4 dib tracked"> - {{ i18n "readingTime" (int $readingTime) }} </span>
<span class="f6 mv4 dib tracked"> - {{ i18n "wordCount" .WordCount }} </span>
{{ end }}
</header>