check_sitemap_lastmod.py fails on local macOS builds (no Git date for non-ASCII paths)

未关闭 适合新手
#929 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
66/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
git, hugo, python

调研方向

从 scripts/check_sitemap_lastmod.py 和 deploy.yaml 第 48 行附近的 Git 设置开始。在全新的 macOS 克隆中使用建议的 core.precomposeunicode 和 core.quotepath 设置,复现缺失的 lastmod 条目,然后与 CI 进行比较。如果该设置能解决问题,就更新 CONTRIBUTING.md 和 AGENTS.md;否则,让检查单独报告这种情况。

由索引模型根据 Issue 内容生成。

描述

Problem

python3 scripts/check_sitemap_lastmod.py public/sitemap.xml fails on a local macOS build of main (2026-10-28), although the same check passes in deploy.yaml:

URLs without <lastmod>: 735 (limit 5)
FAILED

The 735 URLs are glossary and curated-resource pages with non-ASCII characters in their file paths. Hugo finds no Git date for them, so they get no lastmod. PR #925 hit the same gap: 10 curated resources with accented filenames got no dateModified locally.

CI sets git config core.quotepath false (deploy.yaml line 48). Setting that locally did not fix it, which suggests a macOS-specific cause. A likely candidate is Unicode normalisation of filenames (NFD on disk vs NFC in Git; see core.precomposeunicode). This has not been tested.

Impact

Local only, as far as we know: the production sitemap is built in CI, and the deploy check passes. But contributors running the documented checks locally get a misleading failure.

Next step

Try git config core.precomposeunicode true with core.quotepath false on a fresh clone. If that fixes it, document it in CONTRIBUTING.md and AGENTS.md (#923). Otherwise, have the check report this case separately.

主要语言
HTML
星标
42
派生
33
平均合并
17 小时 18 分钟
30 天内合并 PR
111

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

forrtproject/forrtproject.github.io 的其他 Issue

查看 forrtproject/forrtproject.github.io 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。