Improved reading speed values (made them more realistic); for this, a new (partially) ai-generated article has been added
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
{{- with .Params.Author -}}
|
||||
<span class="post-author">{{ . }}</span>
|
||||
{{- end -}}
|
||||
{{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}}
|
||||
<span class="post-reading-time">{{ .ReadingTime }} {{ if eq .ReadingTime 1 }}{{ $.Site.Params._minute | default "minute" }}{{ else }}{{ $.Site.Params._minutes | default "minutes" }}{{ end }} {{$.Site.Params._readingTime | default "to read" }} ({{ .WordCount }} {{ if eq .WordCount 1 }}{{ $.Site.Params._word | default "word" }}{{ else }}{{ $.Site.Params._words | default "words" }}{{ end }})</span>
|
||||
{{- if and (.Param "ShowReadingTime") (eq (.Param "ShowReadingTime") true) -}}{{ $customReadingTime := div (float .WordCount) .Site.Params.readingSpeed }}{{ $customReadingTime = math.Ceil $customReadingTime }}<!-- (browsers insert spaces sometimes)
|
||||
--><span class="post-reading-time">{{ $customReadingTime }} {{ if eq $customReadingTime 1 }}{{ $.Site.Params._minute | default "minute" }}{{ else }}{{ $.Site.Params._minutes | default "minutes" }}{{ end }} {{$.Site.Params._readingTime | default "to read" }} ({{ .WordCount }} {{ if eq .WordCount 1 }}{{ $.Site.Params._word | default "word" }}{{ else }}{{ $.Site.Params._words | default "words" }}{{ end }})</span>
|
||||
{{- end -}}
|
||||
<!-- comments counter -->{{ partial "comments_counter.html" . }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user