惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
月光博客
月光博客
爱范儿
爱范儿
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
腾讯CDC
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
U
Unit 42
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
L
LangChain Blog

Wer Blog

离去 - Wer Blog 更优雅的使用CDN - Wer Blog 极验v3滑动拼图验证码逆向与绕过 - Wer Blog 天冷了 我的博客也下雪了 - Wer Blog 2025,在代码与热爱里慢慢生长 - Wer Blog 从豆包手机被封杀到智谱开源掀桌,这些天,我看到了中国AI最精彩的一场攻防战! - Wer Blog TEWA-861G SUPERADMIN权限获取 - Wer Blog Fuwari搭建指北 - Wer Blog 1Panel部署哪吒监控 - Wer Blog 回顾一下2021年9月7日我发的一个朋友圈 - Wer Blog 使用RVC克隆自己的声音 - Wer Blog B站主播PK打首胜的最佳攻略 - Wer Blog 锐评B站粉丝勋章亲密度升级公告 - Wer Blog 数学期望:从理论到直播盲盒的现实应用 - Wer Blog 个人博客该何去何从 - Wer Blog Fuwari RSS 图片路径修复指北 - Wer Blog 又迁移了... - Wer Blog QQ机器人:Docker 一键部署 Koishi + NapCat 指北 - Wer Blog 旁路由新思路——“互指架构” - Wer Blog 🚀 使用Netlify反向代理网站的终极指南 🌐 - Wer Blog 一键DD脚本——快速重装纯净系统的终极解决方案 - Wer Blog 🌈 为你的Halo博客注入色彩:邮件美化模板 教程 - Wer Blog Ubuntu SSH暴力破解审查、预防 - Wer Blog (稳定)360t7 openwrt-immortalwrt 自用固件 - Wer Blog 纯净版封装镜像 - Wer Blog 备案技巧 根据访客来源屏蔽管局检查 - Wer Blog Hexo 避坑指南 - Wer Blog
优化文章排序 - Wer Blog
Yy · 2025-10-14 · via Wer Blog

问题背景#

默认情况下,Fuwari 使用简单的日期格式(如 2025-10-14)来标记文章发布时间。这种格式在同一天发布多篇文章时无法提供精确的排序,因为缺少时间信息。

修改 new-post.js#

默认的 scripts/new-post.js 脚本只生成日期,我们需要修改它以包含完整的时间信息。

function getDate() {

const today = new Date();

const year = today.getFullYear();

const month = String(today.getMonth() + 1).padStart(2, "0");

const day = String(today.getDate()).padStart(2, "0");

const hours = String(today.getHours()).padStart(2, "0");

const minutes = String(today.getMinutes()).padStart(2, "0");

return `${year}-${month}-${day}`;

return `${year}-${month}-${day}T${hours}:${minutes}:00`;

}