Remove reading time from pages, but leave it for other article types.

This commit is contained in:
Nick Kocharhook 2022-01-02 16:11:21 +00:00
parent 176e581406
commit c9af265921

View File

@ -21,7 +21,12 @@
</h3> </h3>
{{ end }} {{ end }}
{{ if or (not .Date.IsZero) (.Site.Params.article.readingTime) }} {{ $showReadingTime := .Site.Params.article.readingtime }}
{{ if isset .Params "readingtime" }}
{{ $showReadingTime = .Params.readingtime }}
{{ end }}
{{ if or (not .Date.IsZero) ($showReadingTime) }}
<footer class="article-time"> <footer class="article-time">
{{ if not .Date.IsZero }} {{ if not .Date.IsZero }}
<div> <div>
@ -32,7 +37,7 @@
</div> </div>
{{ end }} {{ end }}
{{ if .Site.Params.article.readingTime }} {{ if $showReadingTime }}
<div> <div>
{{ partial "helper/icon" "clock" }} {{ partial "helper/icon" "clock" }}
<time class="article-time--reading"> <time class="article-time--reading">