fix(rank): 重新生成 leaderboard,同步 community 迁移后的文档链接 (#359)#361
Merged
Conversation
generated/site-leaderboard.json 是 #351 community 重归类之前的旧产物,仍含 62 条 /zh/docs/community/* 旧链接(issue 原话:"排行榜中链接未同步更新迁移")。这些路径在 内容树里已不存在,Rank 贡献者弹窗点进去即 404。 按当前 content 树重新生成(prebuild 同款脚本 generate-leaderboard.mts,走后端 /api/public/leaderboard 聚合 + .source 反查 docId→URL): - 已重归类的文档(git101、leworldmodel、swanlab、pte-intro…)→ 直接指向新 learn/career 路径 - 已删除/迁出 docs 的文档(burnout-guide、unsw 等)→ 孤儿过滤丢弃,不再产出死链 - 22 个贡献者一个不少;积分/commits 因数据更新略增;无 locale 后缀泄漏 ## 验证 - community URL:62 → 0;.en/.zh slug 泄漏:0 - 抽样 47 条 distinct URL 全部 200(含原 community、leetcode 拼音 slug、各分类) Closes #359 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Rank 贡献者弹窗点进归属于旧
docs/community/*的文章报 404(#359)。issue 原话:"docs/community 中实际内容迁移到社区分享墙,排行榜中链接未同步更新迁移"。
根因
generated/site-leaderboard.json是 #351(community 技术文档重归类)之前的旧产物,仍含 62 条
/zh/docs/community/*旧链接。这些路径在内容树里已不存在 → 点进去 404。(prebuild 会重生成此文件,但后端 fetch 失败时脚本会 preserve 旧版本,导致旧数据长期留存。)
修复
按当前 content 树重新生成(
scripts/generate-leaderboard.mts,与 prebuild 同源):learn/career路径.en/.zh后缀泄漏验证
.en/.zhslug 泄漏:0;占位名GitHub User <id>:0Closes #359
🤖 Generated with Claude Code