From 241fe980707667b6cf2bed9bd3a7ad3f771d59af Mon Sep 17 00:00:00 2001
From: Mimi <1119186082@qq.com>
Date: Thu, 4 Jun 2020 21:11:41 +0800
Subject: [PATCH] Optimize the behavior of `post_meta` when
`use_date_for_updated` is enabled
---
layout/_macro/post.njk | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/layout/_macro/post.njk b/layout/_macro/post.njk
index 376cb4f..ef15b50 100644
--- a/layout/_macro/post.njk
+++ b/layout/_macro/post.njk
@@ -44,7 +44,6 @@
{%- set date_diff = date(post.date) != date(post.updated) %}
{%- set time_diff = time(post.date) != time(post.updated) %}
- {%- set datetime_diff = date_diff or time_diff %}
{%- if theme.post_meta.created_at %}
@@ -63,10 +62,8 @@
{%- endif %}
- {%- if theme.post_meta.updated_at.enable and datetime_diff %}
- {%- set display_updated = not theme.post_meta.updated_at.another_day or theme.post_meta.updated_at.another_day and date_diff %}
-
- {%- if display_updated or not theme.post_meta.created_at %}
+ {%- if theme.post_meta.updated_at.enable %}
+ {%- if not theme.post_meta.updated_at.another_day or date_diff or not theme.post_meta.created_at %}