From 719ad921ec64b1af34e44bff89baa8f9fc88a165 Mon Sep 17 00:00:00 2001 From: Lyu Date: Fri, 11 Oct 2024 23:39:49 +0800 Subject: [PATCH] fix: hide post-updated when it same as create time or update time is null --- layout/_partial/post/post-meta-info.ejs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/_partial/post/post-meta-info.ejs b/layout/_partial/post/post-meta-info.ejs index 89d81d33..c20e79f8 100644 --- a/layout/_partial/post/post-meta-info.ejs +++ b/layout/_partial/post/post-meta-info.ejs @@ -34,11 +34,12 @@ const { created_datetime_icon, updated_datetime_icon } = theme?.post || {}   <%= date(post.date, theme.post?.datetime_format || 'YYYY-MM-DD HH:mm:ss') %> - + <% if(date(post.date, 'YYYY-MM-DD HH:mm:ss') !== date(post.updated, 'YYYY-MM-DD HH:mm:ss') && post.updated != null) { %>   <%= date(post.updated, theme.post?.datetime_format || 'YYYY-MM-DD HH:mm:ss') %> + <% } %> <% } %> <% if (post.categories.length && (theme?.home?.category === true || page_type === 'post')) { %>