theme-next / hexo-theme-next

Elegant and powerful theme for Hexo.
https://theme-next.org
Other
8.17k stars 2.05k forks source link

文章更新日期随最后一次更新时间变化 #1717

Closed ZHYCarge closed 2 years ago

ZHYCarge commented 2 years ago

Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. 请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist


Expected behavior

The displayed time of an updated article is when it was actually modified 更新文章的显示时间是实际上修改它的时间

Actual behavior

In fact, when I update an article, all articles will be calculated by the last article update time 实际上当我更新一篇文章的时候,所有的文章都会以最后的一篇文章更新时间来进行计算

Steps to reproduce the behavior

  1. 创作一篇文章(Create an article)
  2. 更新它(update it) (If you need a specific reproduction, please contact me)

Environment Information

Node.js and NPM Information

node --version
v16.17.0
npm --version
8.15.0

Package dependencies Information

Hexo Configuration

NexT Configuration

# Post meta display settings
post_meta:
  item_text: true
  created_at: true
  updated_at:
    enable: true
    another_day: true
  categories: true

Other Information

使用环境

其他

在很久之前我修改过所有的cdn地址(因为之前cdn.jsdelivr.net国内用户无法访问)不知道是否会对这个事情造成影响 如果还需要其他配置信息,请联系我进行编辑这个issue

welcome[bot] commented 2 years ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

ZHYCarge commented 2 years ago

我发现了我自身博客的错误。我在使用 GitHub Actions的时候,会自动的将我仓库内所有的博客拉到一个暂存区,因此在使用 hexo g的时候会自动的将时间错算成下载到暂存区的时间,而不是它更新的时间,因此需要在yml命令中添加一部分内容即可进行搞定,参考链接修复 CI 构建博客造成的更新时间错误