mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-07 16:42:45 +00:00
Merge 857633572e818b0113d5d4ba88b865c541b377bf into 3f0b2aa33feefe18b76cb1b64fced8ae800fac5d
This commit is contained in:
commit
c62ba3212c
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user