Fix learn 404, coin animation, full regions, and AI key errors.

Use numeric /learn/{num} routes, register Tailwind coin animations with方孔铜钱 UI, expand to 34 provinces, and surface missing OPENAI_API_KEY clearly.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-10 21:32:20 +08:00
parent 96b659fbe5
commit a487b17165
15 changed files with 931 additions and 159 deletions
+5 -2
View File
@@ -24,9 +24,12 @@ function resolveLearnHref(
if (href.endsWith("/index.md")) {
const mark = href.replace(/\/index\.md$/, "").replace(/^\.\//, "");
if (mark.startsWith("other/")) {
return `/learn/other/${mark.slice("other/".length)}`;
const folder = mark.slice("other/".length);
const num = folder.split(".")[0];
return `/learn/other/${num}`;
}
return `${base}/${mark}`;
const num = mark.split(".")[0];
return `${base}/${num}`;
}
return href;
}