mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 12:03: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>
|
||||
{{ 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">
|
||||
{{ if not .Date.IsZero }}
|
||||
<div>
|
||||
@ -32,7 +37,7 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.article.readingTime }}
|
||||
{{ if $showReadingTime }}
|
||||
<div>
|
||||
{{ partial "helper/icon" "clock" }}
|
||||
<time class="article-time--reading">
|
||||
|
Loading…
Reference in New Issue
Block a user