Skip to content

feat(site-stats): 启用最后活动目录并统一最后活动时间 - #8

Open
XRYua wants to merge 5 commits into
masterfrom
codex/find-how-to-refresh-site-activity-metrics
Open

feat(site-stats): 启用最后活动目录并统一最后活动时间#8
XRYua wants to merge 5 commits into
masterfrom
codex/find-how-to-refresh-site-activity-metrics

Conversation

@XRYua

@XRYua XRYua commented Feb 24, 2026

Copy link
Copy Markdown
Owner

Motivation

  • 在站点统计中展示“最后活动目录”,把“最后活动时间”改为来自三种来源中的最新时间以更准确地反映站点动态。

Description

  • SiteStats.astro 中新增 node:fs/promisesnode:path 的导入并实现递归扫描 src/content/posts.md 文件以获取文件 mtime。
  • 增加对文章 frontmatter updated 字段的判断以找出最近编辑的文章,并将其与最新发布 (published) 时间及文件 mtime 一并作为候选时间。
  • 通过取三者时间的最大值生成 lastActivityDate,并将前端的“距今天数”计算逻辑改为以该时间为准。
  • 在 Widget 中新增可展开的“最后活动目录” details 区块,按中文格式显示:最后编辑文章(及时间)、最后发表文章(及时间)和博客最后改动内容(及时间)。

Testing

  • 运行 pnpm -s astro check,结果通过(0 errors,0 warnings,1 hint)。
  • 尝试使用 Playwright 截图以在浏览器中验证 UI,但在当前容器环境中 Chromium 进程崩溃导致截图步骤失败(Playwright/Chromium SIGSEGV)。

Codex Task

@vercel

vercel Bot commented Feb 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mizuki Ready Ready Preview, Comment Feb 24, 2026 6:28am

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant