mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 20:13:31 +08:00
Remove reading time from pages, but leave it for other article types.
This commit is contained in:
parent
176e581406
commit
c9af265921
@ -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">
|
||||||
|
Loading…
Reference in New Issue
Block a user