🐛 Fixed the post meta display hide when not values.
This commit is contained in:
parent
bb77f9bfb6
commit
8609746b28
@ -1,5 +1,5 @@
|
|||||||
{{- if .Site.Params.postMeta.categories }}
|
{{- if .Site.Params.postMeta.categories }}
|
||||||
{{- if gt (len .Params.categories) 0 }}
|
{{- if and .Params.categories (gt (len .Params.categories) 0) }}
|
||||||
<span class="post-meta-item">
|
<span class="post-meta-item">
|
||||||
<span class="post-meta-item-icon">
|
<span class="post-meta-item-icon">
|
||||||
<i class="far fa-folder-open"></i>
|
<i class="far fa-folder-open"></i>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{{- if .Site.Params.postMeta.created }}
|
{{- if .Site.Params.postMeta.created }}
|
||||||
{{ $createdTime := .PublishDate.Format .Site.Params.timeFormat }}
|
{{ $timeF := .Site.Params.timeFormat }}
|
||||||
|
{{ $createdTime := (.Date.Format $timeF) | default (.PublishDate.Format $timeF) }}
|
||||||
<span class="post-meta-item">
|
<span class="post-meta-item">
|
||||||
<span class="post-meta-item-icon">
|
<span class="post-meta-item-icon">
|
||||||
<i class="far fa-calendar"></i>
|
<i class="far fa-calendar"></i>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{- if and .Site.Params.postMeta.updated.enable .Site.Params.postMeta.updated.anotherDay }}
|
{{- if and .Site.Params.postMeta.updated.enable .Site.Params.postMeta.updated.anotherDay }}
|
||||||
{{- if gt .Lastmod .PublishDate }}
|
{{- if and .Lastmod (gt .Lastmod .PublishDate) }}
|
||||||
{{ $modTime := .Lastmod.Format .Site.Params.timeFormat }}
|
{{ $modTime := .Lastmod.Format .Site.Params.timeFormat }}
|
||||||
<span class="post-meta-item">
|
<span class="post-meta-item">
|
||||||
<span class="post-meta-item-icon">
|
<span class="post-meta-item-icon">
|
||||||
|
Loading…
Reference in New Issue
Block a user