diff --git a/layout/_partial/home-article-meta-info.ejs b/layout/_partial/home-article-meta-info.ejs index fe3b8b6..74295d6 100644 --- a/layout/_partial/home-article-meta-info.ejs +++ b/layout/_partial/home-article-meta-info.ejs @@ -1,12 +1,9 @@ -<% -const target_date = post.date !== post.updated ? post.updated : post.date -%>
  - <% if (post.categories.length && theme.home_article.category.enable === true) { %> diff --git a/source/js/utils.js b/source/js/utils.js index ee2dd1e..b519ea4 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -295,7 +295,7 @@ KEEP.initUtils = () => { post && post.forEach((v) => { const nowDate = Date.now() - const postDate = new Date(v.dataset.date.split(' GMT')[0]).getTime() + const postDate = new Date(v.dataset.updated.split(' GMT')[0]).getTime() v.innerHTML = this.getHowLongAgo(Math.floor((nowDate - postDate) / 1000)) }) },