New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please Integrate function "Article Updated Date" as Default #15
Comments
Thanks for opening this issue, maintainers will get back to you as soon as possible! |
这个改为默认不太好吧,更新日期大多数人习惯,且 hexo _config设置文件里有设置更新日期的选项,不建议直接更新在主题里。 或是: # Post meta display settings
post_meta:
item_text: true
created_at: true
updated_at:
enable: false
another_day: true
categories: true updated_at: enable: true 或是: hexo _config.yml index_generator:
path: ''
per_page: 5
order_by: -date #可选 -updated 更新日期排列 可以解决你所需问题。 |
# Post meta display settings
post_meta:
item_text: true
created_at: true
updated_at:
enable: true
another_day: true
categories: true I had set these config, but it didn't work. Does any other plugin need to be installed? I mean my blog article doesn't have update time info. https://blog.caoyu.info/
|
Nope, no other plugins required. Try
|
It not work |
This means that Hexo cannot read the updated time of the article correctly. If you want to get help from others, please provide your environment information, such as operating system, Node.js version, Hexo version, etc. |
FYI.
|
试试: index_generator:
path: ''
per_page: 5
order_by: -updated 重新hexo clean hexo g hexo s |
@aixiu |
@mysit-cg 我是经过测试了,改为order_by: -updated,并依次更新了本地测试正常。 hexo -v && node -v
hexo: 4.2.0
hexo-cli: 3.1.0
os: Windows_NT 6.1.7601 win32 x64
node: 12.16.1
v8: 7.8.279.23-node.31
uv: 1.34.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 72
nghttp2: 1.40.0
napi: 5
llhttp: 2.0.4
http_parser: 2.9.3
openssl: 1.1.1d
cldr: 35.1
icu: 64.2
tz: 2019c
unicode: 12.1
v12.16.1 并且, $ npm ls --depth 0
hexo-site@0.0.0 E:\My_blog
+-- hexo@4.2.0
+-- hexo-abbrlink@2.0.5
+-- hexo-baidu-url-submit@0.0.6
+-- hexo-deployer-git@2.1.0
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-baidu-sitemap@0.1.6
+-- hexo-generator-category@1.0.0
+-- hexo-generator-feed@2.2.0
+-- hexo-generator-index@1.0.0
+-- hexo-generator-searchdb@1.3.0
+-- hexo-generator-sitemap@2.0.0
+-- hexo-generator-tag@1.0.0
+-- hexo-next-tag@0.3.0 (github:theme-next/hexo-next-tag#095ca82d63db8e6e5231fa9a811d3d68f3d8cc88)
+-- hexo-next-title@0.1.0 (github:theme-next/hexo-next-title#34aff1125fe990f87cb80e148f2c9dfa43f3eb84)
+-- hexo-next-utteranc@1.0.0 (github:theme-next/hexo-next-utteranc#f592272a73cb47923f25443709786942f0398a69)
+-- hexo-related-popular-posts@4.0.0
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-marked@2.0.0
+-- hexo-renderer-stylus@1.1.0
+-- hexo-server@1.0.0
+-- hexo-symbols-count-time@0.7.1
+-- hexo-util@2.1.0
+-- pangu@4.0.7
+-- quicklink@2.0.0
+-- UNMET PEER DEPENDENCY react@^16.8.0
+-- UNMET PEER DEPENDENCY react-dom@^16.8.0
`-- shelljs@0.8.4 没有安装任何影响排序的插件,或是更改过这类机制的模板,比如:置顶文章。 |
@aixiu 可以发一下你的截图么,Thanks♪(・ω・)ノ |
@aixiu |
@aixiu 我的一直没生效 |
@mystic-cg https://theme-next.js.org/docs/theme-settings/posts 这里的文档也有 Post Meta Display |
我这些都做过,但是一直没生效 不确定是否因为,我将主题选择为英文模式有关? |
还不能确定,我所使用的插件,上边已经发了,还有主题使用也是和你一个版本,你本地测试中文模式试试。我很确定主题已经自带了你需要的功能。我没试过英文模式,所以不敢确定是不是BUG |
@aixiu theme和hexo之间的配置应该有冲突了 @stevenjoezhang |
@mystic-cg 可能,我这个默认是未开启的。。恭喜你,解决问题。 |
问题解决了就好。 如果更新到 Hexo 5,需要注意在 Hexo updated_option: 'mtime' 代替 use_date_for_updated: false |
This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs. |
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
If the markdown file was updated, the article can show the update time basing file modified time as default.
The text was updated successfully, but these errors were encountered: