Commit e53d335
committed
fix(ci): IndexNow 提 leetcode slug 时走拼音映射,与实际路由对齐
CR (Copilot) 指出 #331 的 deploy.yml 直接拿文件路径当 slug,但
lib/source.ts 的 transformer 把 career/interview-prep/leetcode/ 下
含中文的文件名拼音化(convertSlugToPinyin):
文件:content/docs/career/interview-prep/leetcode/142.环形链表II_translated.md
实际路由:/<locale>/docs/career/interview-prep/leetcode/142-huan-xing-lian-biao-iitranslated
我之前推的:/<locale>/docs/career/interview-prep/leetcode/142.环形链表II_translated ← 404
修:在 deploy.yml 的 IndexNow URL 提取里复用 generated/leetcode-slug-map.json
(prebuild 时由 scripts/generate-leetcode-slug-map.mts 用同一份算法生成),
对 leetcode 子树的 slug 做 stem → 拼音 映射后再推送。
非 leetcode 子树的 slug 不受影响(它们的文件名都是 ASCII,路由按 file
path 直出,不需要映射)。1 parent a70d3f1 commit e53d335
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
| |||
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
97 | 117 | | |
98 | 118 | | |
99 | 119 | | |
| |||
0 commit comments