From 596292b52356b911751346185aec81e7aa5b13a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 17:02:52 +0000 Subject: [PATCH 1/4] =?UTF-8?q?refactor(docs):=20community=20=E6=8A=80?= =?UTF-8?q?=E6=9C=AF=E6=96=87=E6=A1=A3=E9=87=8D=E5=BD=92=E7=B1=BB=20+=2030?= =?UTF-8?q?1=20+=20syncedFromPosts=20eyebrow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按 IA 整理将 community 下技术内容分别归入目标分类: git mv(30 个文件): - community/dev-tips/* → learn/cs/dev-tips/(含 Katex/ 子目录和图片资产) - community/language/* → career/language/(PTE 语言考试,目标人群同 career) - community/papers/* → learn/ai/papers/(AI 论文读书笔记) - community/tools/* → learn/ai/tools/(ML 实验追踪工具、AI 浏览器) 301 重定向(next.config.mjs): - /docs/community/dev-tips → /zh/docs/learn/cs/dev-tips(含 :path* wildcard) - /docs/community/language/:path* → /zh/docs/career/language/:path* - /docs/community/papers/:path* → /zh/docs/learn/ai/papers/:path* - /docs/community/tools → /zh/docs/learn/ai/tools(含 :path* wildcard) - /docs/community → /zh/docs/learn(根路径废弃后兜底) - 同步更正旧 CommunityShare/* wildcard destination 指向新路径 unsw-student-benefit 双存注记: - frontmatter 加 syncedFromPosts/syncedAuthor/syncedPostsUrl(zh + en) - docs 文章页模板在 h1 之前渲染「此文同步自作者主页 →」eyebrow - PageData 类型同步补充三个字段 burnout-guide 和 community/mental-health/ 暂留,待 team-lead 确认作者归属。 --- app/[locale]/docs/[...slug]/page.tsx | 11 +++ app/types/doc.ts | 5 ++ .../language/pte-intro.en.md | 0 .../language/pte-intro.md | 0 .../community/life/unsw-student-benefit.en.md | 3 + .../community/life/unsw-student-benefit.md | 3 + .../ai}/papers/leworldmodel.en.md | 0 .../ai}/papers/leworldmodel.md | 0 ...petition-improves-non-reasoning-llms.en.md | 0 ...-repetition-improves-non-reasoning-llms.md | 0 .../{community => learn/ai}/tools/index.en.md | 0 .../{community => learn/ai}/tools/index.md | 0 .../ai}/tools/perplexity-comet.en.md | 0 .../ai}/tools/perplexity-comet.md | 0 .../ai}/tools/swanlab.en.mdx | 0 .../{community => learn/ai}/tools/swanlab.mdx | 0 .../CommonUsedMarkdown.assets/testpic1.jpg | Bin .../cs}/dev-tips/CommonUsedMarkdown.en.md | 0 .../cs}/dev-tips/CommonUsedMarkdown.md | 0 .../cs}/dev-tips/Katex/Seb1.en.mdx | 0 .../cs}/dev-tips/Katex/Seb1.mdx | 0 .../cs}/dev-tips/Katex/Seb2.en.mdx | 0 .../cs}/dev-tips/Katex/Seb2.mdx | 0 .../cs}/dev-tips/Katex/index.en.mdx | 0 .../cs}/dev-tips/Katex/index.mdx | 0 ...dflare-r2-sharex-free-image-hosting.en.mdx | 0 ...loudflare-r2-sharex-free-image-hosting.mdx | 0 .../cs}/dev-tips/git101.en.mdx | 0 .../cs}/dev-tips/git101.mdx | 0 .../cs}/dev-tips/index.en.mdx | 0 .../cs}/dev-tips/index.mdx | 0 .../cs}/dev-tips/picturecdn.en.mdx | 0 .../cs}/dev-tips/picturecdn.mdx | 0 .../cs}/dev-tips/raspberry-guide.en.md | 0 .../cs}/dev-tips/raspberry-guide.md | 0 next.config.mjs | 65 +++++++++++++++--- 36 files changed, 76 insertions(+), 11 deletions(-) rename content/docs/{community => career}/language/pte-intro.en.md (100%) rename content/docs/{community => career}/language/pte-intro.md (100%) rename content/docs/{community => learn/ai}/papers/leworldmodel.en.md (100%) rename content/docs/{community => learn/ai}/papers/leworldmodel.md (100%) rename content/docs/{community => learn/ai}/papers/prompt-repetition-improves-non-reasoning-llms.en.md (100%) rename content/docs/{community => learn/ai}/papers/prompt-repetition-improves-non-reasoning-llms.md (100%) rename content/docs/{community => learn/ai}/tools/index.en.md (100%) rename content/docs/{community => learn/ai}/tools/index.md (100%) rename content/docs/{community => learn/ai}/tools/perplexity-comet.en.md (100%) rename content/docs/{community => learn/ai}/tools/perplexity-comet.md (100%) rename content/docs/{community => learn/ai}/tools/swanlab.en.mdx (100%) rename content/docs/{community => learn/ai}/tools/swanlab.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/CommonUsedMarkdown.assets/testpic1.jpg (100%) rename content/docs/{community => learn/cs}/dev-tips/CommonUsedMarkdown.en.md (100%) rename content/docs/{community => learn/cs}/dev-tips/CommonUsedMarkdown.md (100%) rename content/docs/{community => learn/cs}/dev-tips/Katex/Seb1.en.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/Katex/Seb1.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/Katex/Seb2.en.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/Katex/Seb2.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/Katex/index.en.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/Katex/index.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/cloudflare-r2-sharex-free-image-hosting.en.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/cloudflare-r2-sharex-free-image-hosting.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/git101.en.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/git101.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/index.en.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/index.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/picturecdn.en.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/picturecdn.mdx (100%) rename content/docs/{community => learn/cs}/dev-tips/raspberry-guide.en.md (100%) rename content/docs/{community => learn/cs}/dev-tips/raspberry-guide.md (100%) diff --git a/app/[locale]/docs/[...slug]/page.tsx b/app/[locale]/docs/[...slug]/page.tsx index 6b769e27..2dfc5bb3 100644 --- a/app/[locale]/docs/[...slug]/page.tsx +++ b/app/[locale]/docs/[...slug]/page.tsx @@ -126,6 +126,17 @@ export default async function DocPage({ params }: Param) { /> + {data.syncedFromPosts && data.syncedPostsUrl && ( +

+ 此文同步自作者主页 →{" "} + + {data.syncedAuthor ? `${data.syncedAuthor} 的文章` : "原文"} + +

+ )}

{page.data.title} diff --git a/app/types/doc.ts b/app/types/doc.ts index 557c2168..01b53292 100644 --- a/app/types/doc.ts +++ b/app/types/doc.ts @@ -39,6 +39,11 @@ export interface PageData { lang?: string; [key: string]: unknown; }; + // docs 文章同步自作者 posts 主页时在 frontmatter 设置, + // 渲染层据此在文章顶部加「此文同步自作者主页 →」导航提示。 + syncedFromPosts?: boolean; + syncedAuthor?: string; + syncedPostsUrl?: string; // 故意不挂顶层 [key: string]: unknown 索引签名 —— Fumadocs 的 page.data 由 // zod DocOut 推出,没有 index signature;如果在 PageData 上挂一个,as PageData // 会触发 TS2352 "neither type sufficiently overlaps"。所有需要的字段都已 diff --git a/content/docs/community/language/pte-intro.en.md b/content/docs/career/language/pte-intro.en.md similarity index 100% rename from content/docs/community/language/pte-intro.en.md rename to content/docs/career/language/pte-intro.en.md diff --git a/content/docs/community/language/pte-intro.md b/content/docs/career/language/pte-intro.md similarity index 100% rename from content/docs/community/language/pte-intro.md rename to content/docs/career/language/pte-intro.md diff --git a/content/docs/community/life/unsw-student-benefit.en.md b/content/docs/community/life/unsw-student-benefit.en.md index 09ca282b..24f524a8 100644 --- a/content/docs/community/life/unsw-student-benefit.en.md +++ b/content/docs/community/life/unsw-student-benefit.en.md @@ -12,6 +12,9 @@ lang: en translatedFrom: zh translatedAt: 2026-05-11T00:00:00Z translatorAgent: claude-sonnet-4-6 +syncedFromPosts: true +syncedAuthor: "Mira" +syncedPostsUrl: "/u/mira/posts/unsw-student-benefit" --- Recently chatting with classmates, I discovered that our university offers a wealth of hidden benefits that many students are completely unaware of — not just career-related, but also academic. So today I'm here to close the information gap and compile a collection of these hidden campus perks. Feel free to add more in the comments! diff --git a/content/docs/community/life/unsw-student-benefit.md b/content/docs/community/life/unsw-student-benefit.md index 5e6fdff7..0f0ffd26 100644 --- a/content/docs/community/life/unsw-student-benefit.md +++ b/content/docs/community/life/unsw-student-benefit.md @@ -8,6 +8,9 @@ tags: - student-resources - australia-study docId: jgyg6bp0nceyrxirz5qw3zsv +syncedFromPosts: true +syncedAuthor: "Mira" +syncedPostsUrl: "/u/mira/posts/unsw-student-benefit" --- 最近和同学聊天,发现学校有好多隐藏福利很多同学都不知道,不光是就业方面还有学业方面的各种福利。那么今天学姐就来打破信息差,为大家整理一个校园隐藏福利福利合集,还有其他更多隐藏福利欢迎大家评论区补充哦。 diff --git a/content/docs/community/papers/leworldmodel.en.md b/content/docs/learn/ai/papers/leworldmodel.en.md similarity index 100% rename from content/docs/community/papers/leworldmodel.en.md rename to content/docs/learn/ai/papers/leworldmodel.en.md diff --git a/content/docs/community/papers/leworldmodel.md b/content/docs/learn/ai/papers/leworldmodel.md similarity index 100% rename from content/docs/community/papers/leworldmodel.md rename to content/docs/learn/ai/papers/leworldmodel.md diff --git a/content/docs/community/papers/prompt-repetition-improves-non-reasoning-llms.en.md b/content/docs/learn/ai/papers/prompt-repetition-improves-non-reasoning-llms.en.md similarity index 100% rename from content/docs/community/papers/prompt-repetition-improves-non-reasoning-llms.en.md rename to content/docs/learn/ai/papers/prompt-repetition-improves-non-reasoning-llms.en.md diff --git a/content/docs/community/papers/prompt-repetition-improves-non-reasoning-llms.md b/content/docs/learn/ai/papers/prompt-repetition-improves-non-reasoning-llms.md similarity index 100% rename from content/docs/community/papers/prompt-repetition-improves-non-reasoning-llms.md rename to content/docs/learn/ai/papers/prompt-repetition-improves-non-reasoning-llms.md diff --git a/content/docs/community/tools/index.en.md b/content/docs/learn/ai/tools/index.en.md similarity index 100% rename from content/docs/community/tools/index.en.md rename to content/docs/learn/ai/tools/index.en.md diff --git a/content/docs/community/tools/index.md b/content/docs/learn/ai/tools/index.md similarity index 100% rename from content/docs/community/tools/index.md rename to content/docs/learn/ai/tools/index.md diff --git a/content/docs/community/tools/perplexity-comet.en.md b/content/docs/learn/ai/tools/perplexity-comet.en.md similarity index 100% rename from content/docs/community/tools/perplexity-comet.en.md rename to content/docs/learn/ai/tools/perplexity-comet.en.md diff --git a/content/docs/community/tools/perplexity-comet.md b/content/docs/learn/ai/tools/perplexity-comet.md similarity index 100% rename from content/docs/community/tools/perplexity-comet.md rename to content/docs/learn/ai/tools/perplexity-comet.md diff --git a/content/docs/community/tools/swanlab.en.mdx b/content/docs/learn/ai/tools/swanlab.en.mdx similarity index 100% rename from content/docs/community/tools/swanlab.en.mdx rename to content/docs/learn/ai/tools/swanlab.en.mdx diff --git a/content/docs/community/tools/swanlab.mdx b/content/docs/learn/ai/tools/swanlab.mdx similarity index 100% rename from content/docs/community/tools/swanlab.mdx rename to content/docs/learn/ai/tools/swanlab.mdx diff --git a/content/docs/community/dev-tips/CommonUsedMarkdown.assets/testpic1.jpg b/content/docs/learn/cs/dev-tips/CommonUsedMarkdown.assets/testpic1.jpg similarity index 100% rename from content/docs/community/dev-tips/CommonUsedMarkdown.assets/testpic1.jpg rename to content/docs/learn/cs/dev-tips/CommonUsedMarkdown.assets/testpic1.jpg diff --git a/content/docs/community/dev-tips/CommonUsedMarkdown.en.md b/content/docs/learn/cs/dev-tips/CommonUsedMarkdown.en.md similarity index 100% rename from content/docs/community/dev-tips/CommonUsedMarkdown.en.md rename to content/docs/learn/cs/dev-tips/CommonUsedMarkdown.en.md diff --git a/content/docs/community/dev-tips/CommonUsedMarkdown.md b/content/docs/learn/cs/dev-tips/CommonUsedMarkdown.md similarity index 100% rename from content/docs/community/dev-tips/CommonUsedMarkdown.md rename to content/docs/learn/cs/dev-tips/CommonUsedMarkdown.md diff --git a/content/docs/community/dev-tips/Katex/Seb1.en.mdx b/content/docs/learn/cs/dev-tips/Katex/Seb1.en.mdx similarity index 100% rename from content/docs/community/dev-tips/Katex/Seb1.en.mdx rename to content/docs/learn/cs/dev-tips/Katex/Seb1.en.mdx diff --git a/content/docs/community/dev-tips/Katex/Seb1.mdx b/content/docs/learn/cs/dev-tips/Katex/Seb1.mdx similarity index 100% rename from content/docs/community/dev-tips/Katex/Seb1.mdx rename to content/docs/learn/cs/dev-tips/Katex/Seb1.mdx diff --git a/content/docs/community/dev-tips/Katex/Seb2.en.mdx b/content/docs/learn/cs/dev-tips/Katex/Seb2.en.mdx similarity index 100% rename from content/docs/community/dev-tips/Katex/Seb2.en.mdx rename to content/docs/learn/cs/dev-tips/Katex/Seb2.en.mdx diff --git a/content/docs/community/dev-tips/Katex/Seb2.mdx b/content/docs/learn/cs/dev-tips/Katex/Seb2.mdx similarity index 100% rename from content/docs/community/dev-tips/Katex/Seb2.mdx rename to content/docs/learn/cs/dev-tips/Katex/Seb2.mdx diff --git a/content/docs/community/dev-tips/Katex/index.en.mdx b/content/docs/learn/cs/dev-tips/Katex/index.en.mdx similarity index 100% rename from content/docs/community/dev-tips/Katex/index.en.mdx rename to content/docs/learn/cs/dev-tips/Katex/index.en.mdx diff --git a/content/docs/community/dev-tips/Katex/index.mdx b/content/docs/learn/cs/dev-tips/Katex/index.mdx similarity index 100% rename from content/docs/community/dev-tips/Katex/index.mdx rename to content/docs/learn/cs/dev-tips/Katex/index.mdx diff --git a/content/docs/community/dev-tips/cloudflare-r2-sharex-free-image-hosting.en.mdx b/content/docs/learn/cs/dev-tips/cloudflare-r2-sharex-free-image-hosting.en.mdx similarity index 100% rename from content/docs/community/dev-tips/cloudflare-r2-sharex-free-image-hosting.en.mdx rename to content/docs/learn/cs/dev-tips/cloudflare-r2-sharex-free-image-hosting.en.mdx diff --git a/content/docs/community/dev-tips/cloudflare-r2-sharex-free-image-hosting.mdx b/content/docs/learn/cs/dev-tips/cloudflare-r2-sharex-free-image-hosting.mdx similarity index 100% rename from content/docs/community/dev-tips/cloudflare-r2-sharex-free-image-hosting.mdx rename to content/docs/learn/cs/dev-tips/cloudflare-r2-sharex-free-image-hosting.mdx diff --git a/content/docs/community/dev-tips/git101.en.mdx b/content/docs/learn/cs/dev-tips/git101.en.mdx similarity index 100% rename from content/docs/community/dev-tips/git101.en.mdx rename to content/docs/learn/cs/dev-tips/git101.en.mdx diff --git a/content/docs/community/dev-tips/git101.mdx b/content/docs/learn/cs/dev-tips/git101.mdx similarity index 100% rename from content/docs/community/dev-tips/git101.mdx rename to content/docs/learn/cs/dev-tips/git101.mdx diff --git a/content/docs/community/dev-tips/index.en.mdx b/content/docs/learn/cs/dev-tips/index.en.mdx similarity index 100% rename from content/docs/community/dev-tips/index.en.mdx rename to content/docs/learn/cs/dev-tips/index.en.mdx diff --git a/content/docs/community/dev-tips/index.mdx b/content/docs/learn/cs/dev-tips/index.mdx similarity index 100% rename from content/docs/community/dev-tips/index.mdx rename to content/docs/learn/cs/dev-tips/index.mdx diff --git a/content/docs/community/dev-tips/picturecdn.en.mdx b/content/docs/learn/cs/dev-tips/picturecdn.en.mdx similarity index 100% rename from content/docs/community/dev-tips/picturecdn.en.mdx rename to content/docs/learn/cs/dev-tips/picturecdn.en.mdx diff --git a/content/docs/community/dev-tips/picturecdn.mdx b/content/docs/learn/cs/dev-tips/picturecdn.mdx similarity index 100% rename from content/docs/community/dev-tips/picturecdn.mdx rename to content/docs/learn/cs/dev-tips/picturecdn.mdx diff --git a/content/docs/community/dev-tips/raspberry-guide.en.md b/content/docs/learn/cs/dev-tips/raspberry-guide.en.md similarity index 100% rename from content/docs/community/dev-tips/raspberry-guide.en.md rename to content/docs/learn/cs/dev-tips/raspberry-guide.en.md diff --git a/content/docs/community/dev-tips/raspberry-guide.md b/content/docs/learn/cs/dev-tips/raspberry-guide.md similarity index 100% rename from content/docs/community/dev-tips/raspberry-guide.md rename to content/docs/learn/cs/dev-tips/raspberry-guide.md diff --git a/next.config.mjs b/next.config.mjs index e562bd0a..44739967 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -113,23 +113,23 @@ const config = { "/zh/docs/learn/ai/foundation-models/rag/context-engineering-intro", statusCode: 301, }, - // CommunityShare/Geek/leworldmodel → community/papers(paper summary 归社区论文) + // CommunityShare/Geek/leworldmodel → learn/ai/papers(community 重归类) { source: "/docs/CommunityShare/Geek/leworldmodel", - destination: "/zh/docs/community/papers/leworldmodel", + destination: "/zh/docs/learn/ai/papers/leworldmodel", statusCode: 301, }, - // CommunityShare/Amazing-AI-Tools 下两篇分家:tool review 归 tools,paper 归 papers + // CommunityShare/Amazing-AI-Tools 下两篇分家:tool review 归 learn/ai/tools,paper 归 learn/ai/papers { source: "/docs/CommunityShare/Amazing-AI-Tools/perplexity-comet", - destination: "/zh/docs/community/tools/perplexity-comet", + destination: "/zh/docs/learn/ai/tools/perplexity-comet", statusCode: 301, }, { source: "/zh/docs/CommunityShare/Amazing-AI-Tools/prompt-repetition-improves-non-reasoning-llms", destination: - "/zh/docs/community/papers/prompt-repetition-improves-non-reasoning-llms", + "/zh/docs/learn/ai/papers/prompt-repetition-improves-non-reasoning-llms", statusCode: 301, }, // PPO 强化学习主题 → learn/ai/reinforcement-learning @@ -139,10 +139,10 @@ const config = { destination: "/zh/docs/learn/ai/reinforcement-learning/ppo", statusCode: 301, }, - // swanlab 之前 test run 已移到 ai/misc-tools/(main commit d6d0a3d),现改到 community/tools + // swanlab 之前 test run 已移到 ai/misc-tools/,后归 community/tools,现再归 learn/ai/tools { source: "/docs/ai/misc-tools/swanlab", - destination: "/zh/docs/community/tools/swanlab", + destination: "/zh/docs/learn/ai/tools/swanlab", statusCode: 301, }, // cpp_backend 老命名(下划线 / 大驼峰)→ learn/cs/cpp-backend/ (kebab-case) @@ -210,7 +210,50 @@ const config = { }, { source: "/docs/CommunityShare/Amazing-AI-Tools", - destination: "/zh/docs/community/tools", + destination: "/zh/docs/learn/ai/tools", + statusCode: 301, + }, + + // ============= community 子目录重归类(2026-05 docs IA 整理)============= + // dev-tips(开发工具/技巧)→ learn/cs/dev-tips + // index 单独列出以保证精确匹配先于 :path* wildcard 命中 + { + source: "/docs/community/dev-tips", + destination: "/zh/docs/learn/cs/dev-tips", + statusCode: 301, + }, + { + source: "/docs/community/dev-tips/:path*", + destination: "/zh/docs/learn/cs/dev-tips/:path*", + statusCode: 301, + }, + // language(语言考试)→ career/language + { + source: "/docs/community/language/:path*", + destination: "/zh/docs/career/language/:path*", + statusCode: 301, + }, + // papers(AI 论文读书笔记)→ learn/ai/papers + { + source: "/docs/community/papers/:path*", + destination: "/zh/docs/learn/ai/papers/:path*", + statusCode: 301, + }, + // tools(AI 工具)→ learn/ai/tools + { + source: "/docs/community/tools", + destination: "/zh/docs/learn/ai/tools", + statusCode: 301, + }, + { + source: "/docs/community/tools/:path*", + destination: "/zh/docs/learn/ai/tools/:path*", + statusCode: 301, + }, + // community 根(内容搬空后)→ learn(泛学习入口) + { + source: "/docs/community", + destination: "/zh/docs/learn", statusCode: 301, }, @@ -249,7 +292,7 @@ const config = { // 生成的 slug 映射做字面匹配,单跳 301 到正确拼音 URL。 { source: "/docs/CommunityShare/Language/:path*", - destination: "/zh/docs/community/language/:path*", + destination: "/zh/docs/career/language/:path*", statusCode: 301, }, { @@ -264,12 +307,12 @@ const config = { }, { source: "/docs/CommunityShare/Geek/:path*", - destination: "/zh/docs/community/dev-tips/:path*", + destination: "/zh/docs/learn/cs/dev-tips/:path*", statusCode: 301, }, { source: "/docs/CommunityShare/Amazing-AI-Tools/:path*", - destination: "/zh/docs/community/tools/:path*", + destination: "/zh/docs/learn/ai/tools/:path*", statusCode: 301, }, From 8cee02b863b32d951d7cc5dc1ef43ff910bc3391 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 17:11:15 +0000 Subject: [PATCH 2/4] =?UTF-8?q?refactor(docs):=20=E5=88=A0=E5=8F=99?= =?UTF-8?q?=E4=BA=8B=E5=8E=9F=E6=96=87=20+=20=E5=8A=A0301=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E4=BD=9C=E8=80=85posts=20+=20=E5=BA=9F=E5=BC=83commun?= =?UTF-8?q?ity=E7=88=B6=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户定删+301(不双存): 删除文件(8个): - community/life/unsw-student-benefit.md + .en.md(搬入作者 posts) - community/mental-health/burnout-guide.mdx + .en.mdx(搬入作者 posts) - community/mental-health/index.mdx + .en.mdx(目录已空) - community/index.mdx + .en.mdx(整个分类废弃) 撤销 syncedFromPosts frontmatter 注记(随文件删除,无需额外处理)。 新增301(next.config.mjs): - /docs/community/life/unsw-student-benefit → /zh/u/github_163523387/posts/unsw-student-benefit - /docs/community/mental-health/burnout-guide → /zh/u/github_114939201/posts/burnout-guide - CommunityShare/Life/:path* wildcard 改指 /zh/docs/learn(兜底防404) - CommunityShare/MentalHealth/:path* wildcard 改指 /zh/docs/learn(兜底防404) /docs/community 根301已有(→ /zh/docs/learn),无需新增。 build验证:EXIT 0,community docs路由已从路由表消失,无回退。 --- content/docs/community/index.en.mdx | 20 ----- content/docs/community/index.mdx | 16 ---- .../community/life/unsw-student-benefit.en.md | 76 ----------------- .../community/life/unsw-student-benefit.md | 64 --------------- .../mental-health/burnout-guide.en.mdx | 81 ------------------- .../community/mental-health/burnout-guide.mdx | 77 ------------------ .../docs/community/mental-health/index.en.mdx | 12 --- .../docs/community/mental-health/index.mdx | 8 -- next.config.mjs | 17 +++- 9 files changed, 15 insertions(+), 356 deletions(-) delete mode 100644 content/docs/community/index.en.mdx delete mode 100644 content/docs/community/index.mdx delete mode 100644 content/docs/community/life/unsw-student-benefit.en.md delete mode 100644 content/docs/community/life/unsw-student-benefit.md delete mode 100644 content/docs/community/mental-health/burnout-guide.en.mdx delete mode 100644 content/docs/community/mental-health/burnout-guide.mdx delete mode 100644 content/docs/community/mental-health/index.en.mdx delete mode 100644 content/docs/community/mental-health/index.mdx diff --git a/content/docs/community/index.en.mdx b/content/docs/community/index.en.mdx deleted file mode 100644 index a42be3c8..00000000 --- a/content/docs/community/index.en.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Community Shares -description: "The Community Shares section of Involution Hell (involutionhell.com) brings together real-world experience and technical insights from CS/AI and job-hunting, covering algorithm practice, system design, interview tips, and more. Perfect for CS students and developers preparing for big-tech interviews or seeking career breakthroughs — learn from genuine stories, avoid common pitfalls, and find your path forward." -date: "2025-09-18" -docId: sfzt30mtx0jsuv6esnpm3w8y -lang: en -translatedFrom: zh -translatedAt: 2026-05-11T00:00:00Z -translatorAgent: claude-sonnet-4-6 ---- - -import { SectionIndex } from "@/app/components/docs/SectionIndex"; - -Welcome to the Community Shares section! Whether you are a tech enthusiast or someone who loves life, feel free to contribute! - -A small article can sometimes help a lost stranger find their way. - -> Please contact the original author for permission before reposting. Thank you! - - diff --git a/content/docs/community/index.mdx b/content/docs/community/index.mdx deleted file mode 100644 index 12bff33d..00000000 --- a/content/docs/community/index.mdx +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: 群友分享 -description: "内卷地狱 involutionhell.com 群友分享板块汇集 CS/AI/求职领域实战经验与技术干货,涵盖算法刷题、系统设计、面试技巧等核心内容。适合正在备战大厂面试、寻求职业突破的计算机学生与开发者,从真实案例中获取避坑指南与成长路径。" -date: "2025-09-18" -docId: sfzt30mtx0jsuv6esnpm3w8y ---- - -import { SectionIndex } from "@/app/components/docs/SectionIndex"; - -欢迎来到群友分享板块!无论你是技术极客,还是热爱生活,都欢迎积极投稿! - -一篇微不足道的文章或许可以帮助一个迷茫的陌生人~ - -> 转载文章请先联系原作者获取授权,谢谢! - - diff --git a/content/docs/community/life/unsw-student-benefit.en.md b/content/docs/community/life/unsw-student-benefit.en.md deleted file mode 100644 index 24f524a8..00000000 --- a/content/docs/community/life/unsw-student-benefit.en.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: UNSW Tuition Recovery Plan — Hidden Benefits You Might Not Know About -description: "A comprehensive breakdown of hidden benefits at UNSW (University of New South Wales), covering the Apple Education Store with up to 12% discount and Back to Uni gifts, the Career Discovery Mentoring Program (9 weeks with one-on-one coaching and AHEGS certification), and the official internship and job portal with visa status filtering. Essential reading for current UNSW students, prospective international students, and job seekers looking to save money and accelerate their careers." -date: "2025-10-03" -tags: - - unsw - - university-benefits - - student-resources - - australia-study -docId: jgyg6bp0nceyrxirz5qw3zsv -lang: en -translatedFrom: zh -translatedAt: 2026-05-11T00:00:00Z -translatorAgent: claude-sonnet-4-6 -syncedFromPosts: true -syncedAuthor: "Mira" -syncedPostsUrl: "/u/mira/posts/unsw-student-benefit" ---- - -Recently chatting with classmates, I discovered that our university offers a wealth of hidden benefits that many students are completely unaware of — not just career-related, but also academic. So today I'm here to close the information gap and compile a collection of these hidden campus perks. Feel free to add more in the comments! - -## Apple Education Store for Students - -UNSW students can purchase iPads, MacBooks, and other Apple products directly through the Apple Education Store at prices lower than retail — discounts of up to 12%. Around February each year, there is often a "Back to Uni" promotion that includes a free pair of AirPods or a $240 gift card. - -[Apple UNSW Education Store](https://www.apple.com/au_edu_800094/store) - -Tip: The UNSW-specific link is usually slightly cheaper than the generic education discount link, so make sure you're using the right one. - -## UNSW Career Discovery Mentoring Program - -The UNSW Career Discovery Mentoring Program runs for 9 weeks and includes: an initial training and goal-setting phase, online professional development courses, five hours of one-on-one mentoring (online or in person), and a final reflection to earn AHEGS (Australian Higher Education Graduation Statement) certification. - -This program is generally only open during Term 1 and Term 3 — check the official website regularly for application deadlines. I heard that over 700 students applied in the cohort I joined, and some unfortunately did not get matched with a mentor, so take your application materials seriously! - -[Program details](https://www.unsw.edu.au/employability/discover/unsw-career-discovery-mentoring-program) - -The program features many outstanding mentors, including people from MIT — they not only share industry knowledge but some even offer internal referrals. Quite a few students have landed internship recommendations through this program, so it's a huge career booster. - -## Internships & Job Portal - -UNSW's official employment platform lists a wide range of internship, part-time, and full-time positions across computer science, engineering, finance, marketing, research, and more. You can filter opportunities by visa status. Many students previously had no idea why they were getting rejected instantly — often it was simply a visa eligibility mismatch. Using the visa filter, you can find companies that accept Student Visas and 485 Graduate Work Stream visas, which can significantly improve your application success rate. - -[Internship and job opportunities portal](https://unswconnect.unsw.edu.au/careers?disciplines=computer-science&disciplines=engineering-software&job_type=internships&work_rights=au-australian-working-visa&work_rights=au-australian-student-visa&work_rights=au-australian-skilled-migration-visa-485&work_rights=au-australian-bridging-visa) - -Many large companies and well-known firms post their job listings on this platform first. - -## UNSW On-Campus Jobs - -In addition to external internships and collaborative programs, UNSW itself recruits student assistants, research assistants, administrative support staff, and other on-campus positions. These roles are typically flexible and easy to fit around a student's schedule. - -[UNSW on-campus job listings](https://external-careers.jobs.unsw.edu.au/cw/en/listing/) - -Many students have not only earned income through on-campus roles but also built valuable work experience and formed close connections with academic departments and research teams. - -## Study Exchange Opportunities - -UNSW's exchange program is remarkably well-resourced, with partner institutions including ETH Zurich, the University of Pennsylvania's Wharton School, and dozens of top universities across Europe, Asia, and North America. - -[Search partner institutions](https://www.unsw.edu.au/student/opportunities/overseas-study/search-exchange-partners) - -Exchange programs let you earn credits, experience a different culture, and make international friends. One senior student who went to Wharton mentioned that through the exchange program, you only pay UNSW tuition rates — not the sky-high American tuition fees. That alone can save you thousands of dollars! - -## Other Student Benefits - -- **O-Week freebies**: New students receive a free hoodie and various club perks during Orientation Week. - -- **UNSW Fitness & Aquatic Centre discount**: The gym and pool are priced well below commercial rates. The popular UNSW swimming lessons cost just $75 for a full term — don't miss out! - -- **Arc Student Membership**: Enjoy free access to club events, a Welcome Pack, and discounts on various activities. Check Arc Sports for things like "Global Sports" — I've seen posts about activities like kayaking available for as low as $16.50, down from the original $95 price, though spots are limited so keep an eye out. - -- **Free counselling**: Book mental health counselling in Mandarin or English — covered by student insurance. - -- **UNSW Library**: Access to extensive electronic databases and free borrowing services. - -- **Career development workshops**: Resume reviews, mock interviews, and industry guest speaker events. diff --git a/content/docs/community/life/unsw-student-benefit.md b/content/docs/community/life/unsw-student-benefit.md deleted file mode 100644 index 0f0ffd26..00000000 --- a/content/docs/community/life/unsw-student-benefit.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: UNSW学费回收计划-那些你还不知道的隐藏福利 -description: "UNSW学费回收计划隐藏福利全解析,涵盖Apple教育商店最高12%折扣及返校季赠礼、职业导师计划(9周含一对一辅导与AHEGS认证)、官方实习就业平台支持签证筛选。适合UNSW在读生、准留学生及求职者了解省钱与职业发展资源。" -date: "2025-10-03" -tags: - - unsw - - university-benefits - - student-resources - - australia-study -docId: jgyg6bp0nceyrxirz5qw3zsv -syncedFromPosts: true -syncedAuthor: "Mira" -syncedPostsUrl: "/u/mira/posts/unsw-student-benefit" ---- - -最近和同学聊天,发现学校有好多隐藏福利很多同学都不知道,不光是就业方面还有学业方面的各种福利。那么今天学姐就来打破信息差,为大家整理一个校园隐藏福利福利合集,还有其他更多隐藏福利欢迎大家评论区补充哦。 - -## 学生专属 Apple 教育商店 - -UNSW 学生可以直接通过 Apple 教育商店购买 iPad、MacBook 等产品,价格比正常渠道便宜,最高可以有 12%的折扣,而且在每年 2 月左右,还经常有 back to uni 活动,可以赠送 AirPods 或者 240 刀的礼品卡等。 -[Apple unsw 专属教育优惠商店入口](https://www.apple.com/au_edu_800094/store) -小提示:unsw 的专属链接一般会比普通的教育优惠便宜一点点,大家不要进错了链接哦 - -## UNSW Career Discovery Mentoring Program - -UNSW 的职业导师计划为期 9 周,包含前期培训和目标设定、在线职业发展课程、五小时一对一导师辅导(线上或线下)、最终反思总结并获得 AHEGS 认证。 -一般这个项目只在 Term1 和 Term3 开放,大家记得及时去官网查看报名截止日期。学姐参加的这一期据说有 700 多个学生报名,有些报名的同学遗憾的没有匹配上导师,所以申请材料一定要认真写哦! - -[详细项目介绍](https://www.unsw.edu.au/employability/discover/unsw-career-discovery-mentoring-program) -这个项目很多大牛导师,包括 MIT 的大佬,不光教你很多行业的知识,有的还会给你内推。不少学生通过该项目获得行业内部实习推荐,对职业发展帮助很大哦。 - -## Internships & Job Portal - -UNSW 官方就业机会平台提供各类实习、兼职与全职岗位,涵盖计算机、工程、金融、市场、科研等方向,并可根据签证状态筛选。之前很多同学投了简历都不知道为什么秒拒,其实很多时候也是签证不符合要求。通过这个筛选功能,能搜索哪些公司是接收学生签和 485 工签的,可以大大提高申请效率哦! - -[实习与工作机会平台](https://unswconnect.unsw.edu.au/careers?disciplines=computer-science&disciplines=engineering-software&job_type=internships&work_rights=au-australian-working-visa&work_rights=au-australian-student-visa&work_rights=au-australian-skilled-migration-visa-485&work_rights=au-australian-bridging-visa) -许多大厂和知名企业都会在此平台优先发布招聘信息。 - -## UNSW 校内岗位招聘 - -除了外部实习与合作项目,UNSW 本校也会招聘学生助理、研究助理、行政支持等校内岗位。这些工作通常灵活,适合学生课余时间安排。 - -[UNSW 校内岗位招聘网站](https://external-careers.jobs.unsw.edu.au/cw/en/listing/) -不少同学通过校内岗位不仅获得了收入,还积累了宝贵的工作经验,并能与学院和科研团队建立紧密联系。 - -## 海外交换机会 - -UNSW 的交换项目资源十分强大,合作院校包括苏黎世联邦理工(ETH Zurich)、宾夕法尼亚大学沃顿商学院(UPenn Wharton)以及欧洲、亚洲、北美的众多顶尖院校。 -[搜索合作院校](https://www.unsw.edu.au/student/opportunities/overseas-study/search-exchange-partners) -交换不仅能修读学分,还能体验不同文化,结交国际友人。 而且有去沃顿商学院的学长说,通过交换项目无需支付高昂的美国院校的学费,只需要正常走 unsw 的学费支付流程。这么一看,分分钟省下几千刀啊! - -## 其他学生福利 - -Oweek 新生可以领取免费的 hoodie 还有各种社团福利 - -UNSW Fitness & Aquatic Centre 学生折扣:健身房和游泳池价格远低于校外。热门的 unsw 游泳课只需要 75 刀就可游泳一学期,这个福利还不快抓住! - -Arc 学生会员:可免费参加社团活动,领取 Welcome Pack,并享受各类活动折扣。比如可以去arc sports搜一下global sports,之前看到有同学分享 16.5 刀就可参加原价 95 刀的皮划艇等活动,但是名额有限,大家要随时关注这类活动哦! - -免费心理咨询:可预约中英文心理咨询服务,这些都是学生保险都可以报销的。 - -UNSW Library:提供丰富的电子数据库和免费借阅服务。 - -职业发展讲座与 Workshop:包括简历修改、模拟面试和行业嘉宾讲座等等。 diff --git a/content/docs/community/mental-health/burnout-guide.en.mdx b/content/docs/community/mental-health/burnout-guide.en.mdx deleted file mode 100644 index 16bc0137..00000000 --- a/content/docs/community/mental-health/burnout-guide.en.mdx +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Programmer's Burnout Recovery Guide -description: "A burnout recovery guide for programmers: unpacks the chronic psychological state caused by prolonged stress and emotional exhaustion, covering triggers such as excessive conscientiousness, overwork, and workplace gaslighting (PUA), along with three core principles for recovery. Essential reading for programmers and job seekers experiencing insomnia, brain fog, or self-doubt under sustained high-pressure conditions." -date: "2025-01-27" -tags: - - burnout - - mental-health - - programmer -docId: q8d1j9bii2ve2p7pp4xtok79 -lang: en -translatedFrom: zh -translatedAt: 2026-05-11T00:00:00Z -translatorAgent: claude-sonnet-4-6 ---- - -> This article was compiled by YBJ0000 (https://github.com/YBJ0000) for internal community learning and sharing purposes only. - ---- - -## What Is Burnout? - -**ChatGPT's answer:** -Burnout is not simply "being tired" or "not wanting to work." It is **a chronic psychological state caused by the accumulation of prolonged stress and emotional exhaustion**. - -**Common symptoms:** - -- Dreading going to work; feeling oppressed the moment you step into the office -- Needing significant mental preparation before doing anything -- Saying things like "I want to die" casually - -> When people say "I want to die," they usually don't mean it literally. What they really mean is: I want to stop — no work notifications, sleep until I naturally wake up, eat good food, watch something light, have someone close by... just rest properly. - ---- - -## Why Does Burnout Happen? - -- Excessive sense of responsibility — wanting to do everything perfectly -- **Overwork**: internalizing external pressure as your own problem -- Susceptibility to **workplace gaslighting (PUA)** — constantly doubting whether you are good enough - ---- - -## Three Principles for Recovery - -1. **Your physical health comes first** - Insomnia, brain fog, nervous exhaustion → rest first → seek professional psychological intervention if symptoms become severe - - > Take PTO / FMLA - -2. **You have not done anything wrong** - - Boss micromanaging? Performance not where they want it? No visible growth? → **They are gaslighting you!** - - Tell yourself: _"You have already done well enough"_ × 3 - -3. **Do not quit impulsively** - - Think carefully if visa or immigration status is involved - - If financially viable → treat the job like a countdown timer collecting a paycheck - - Try to find your next role while still employed - ---- - -## What I Did After Burnout - -- **Engage with people!** I love my friends 🫂 -- Find a focus outside of work: - - Sudoku / vlogging / pets / exercise - - Even in a 996 grind, carve out a small hobby for yourself -- Therapist & company resources: improve sleep quality, sensory grounding exercises -- The "20 minutes in the park" method -- Dating: no personal experience here — proceed with caution - ---- - -## Final Thoughts - -- Burnout is a universal problem for working people everywhere -- Remember: **health > work > money** -- Wishing everyone happiness every day ☀️ - ---- - -> 📝 Original video source: [Bilibili - 璇璇想吃西瓜](https://www.bilibili.com/video/BV1jjHmzYEhV) diff --git a/content/docs/community/mental-health/burnout-guide.mdx b/content/docs/community/mental-health/burnout-guide.mdx deleted file mode 100644 index cb8af9d2..00000000 --- a/content/docs/community/mental-health/burnout-guide.mdx +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: 程序员 Burnout 自救指南 -description: "程序员 Burnout 自救指南:解析长期压力与情绪消耗导致的慢性心理状态,涵盖责任心过强、Overwork、PUA 等诱因及自救三原则。适合长期高压工作、出现失眠脑雾或怀疑自我的程序员与求职者阅读。" -date: "2025-01-27" -tags: - - burnout - - mental-health - - programmer -docId: q8d1j9bii2ve2p7pp4xtok79 ---- - -> 本文内容由YBJ0000 (https://github.com/YBJ0000) 整理,仅用于社群内部学习与分享。 - ---- - -## 什么是 Burnout? - -**ChatGPT 的回答:** -Burnout 不是简单的“累”或“不想干了”,它是**长期压力与情绪消耗堆积导致的一种慢性心理状态**。 - -**常见症状:** - -- 不想去上班,进公司就压抑 -- 做事需要很多心理准备 -- 把“想死”挂嘴边 - -> 很多人说的“想死”,其实不是字面上的,而是想停下来休息一下,没有工作消息打扰,睡到自然醒,吃好吃的饭菜,看看轻松的内容,有亲密的陪伴……好好休息。 - ---- - -## 为什么会 Burnout? - -- 责任心过强,想把事情做到完美 -- **Overwork**:把外界压力内化成自己的问题 -- 容易被 **PUA**,怀疑自己不够好 - ---- - -## 自救三原则 - -1. **身体健康最重要** - 出现失眠、脑雾、神经衰弱 → 先休息 → 过于严重的时候请寻求专业的心理干预 - - > Take PTO / FMLA - -2. **你没有做错任何事情** - - 老板 micromanage?Performance 不够好?你没有 growth?→ **他们在 PUA!** - - 告诉自己:_“你已经做得很好了”_ ×3 - -3. **不要冲动辞职** - - 有身份/签证要考虑清楚 - - 经济能接受 → 就当计时器赚钱 - - 尽量在职找到下家 - ---- - -## Burnout 之后我做了什么 - -- **Engage with people!** 我爱我的朋友们 🫂 -- 找工作之外的 focus: - - 数独 / vlog / 宠物 / 运动 - - 即使是 996,也要给自己找点小爱好 -- Therapist & 公司资源:改善睡眠,五感训练 -- “公园 20 分钟” -- Dating:个人没有经验,建议谨慎选择 - ---- - -## 最后想说 - -- Burnout 是全世界职场人的共同问题 -- 记住:**身体 > 工作 > 钱** -- 祝大家天天开心 ☀️ - ---- - -> 📝 原视频出处:[B站 - 璇璇想吃西瓜](https://www.bilibili.com/video/BV1jjHmzYEhV) diff --git a/content/docs/community/mental-health/index.en.mdx b/content/docs/community/mental-health/index.en.mdx deleted file mode 100644 index e978f95e..00000000 --- a/content/docs/community/mental-health/index.en.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Mental Health -description: "The Mental Health section of Involution Hell's documentation site focuses on psychological well-being under the high-pressure environments of CS/AI job seeking, covering anxiety management, burnout recovery, effective rest strategies, and mindfulness training. Highly recommended for programmers, AI practitioners, and CS students experiencing the grind of job hunting, 996 work culture, or intense academic pressure." -date: "2025-09-18" -docId: rxyvvumcvfl2oh3hky8urkfn -lang: en -translatedFrom: zh -translatedAt: 2026-05-11T00:00:00Z -translatorAgent: claude-sonnet-4-6 ---- - -Welcome to the Mental Health section! diff --git a/content/docs/community/mental-health/index.mdx b/content/docs/community/mental-health/index.mdx deleted file mode 100644 index 05d03e37..00000000 --- a/content/docs/community/mental-health/index.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: 心理健康 -description: "内卷地狱技术文档心理健康板块,聚焦CS/AI求职高压环境下的心理调适与情绪管理,涵盖焦虑缓解、职业倦怠应对、高效休息法及正念训练等关键技术点。适合正在经历求职内卷、面临996或高强度学习压力的程序员、AI从业者及计算机专业学生阅读。" -date: "2025-09-18" -docId: rxyvvumcvfl2oh3hky8urkfn ---- - -欢迎来到心理健康板块! diff --git a/next.config.mjs b/next.config.mjs index 44739967..95ebd8d1 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -250,6 +250,17 @@ const config = { destination: "/zh/docs/learn/ai/tools/:path*", statusCode: 301, }, + // 叙事文章(已搬入作者 posts 主页,/docs 原文删除)→ 对应 posts URL + { + source: "/docs/community/life/unsw-student-benefit", + destination: "/zh/u/github_163523387/posts/unsw-student-benefit", + statusCode: 301, + }, + { + source: "/docs/community/mental-health/burnout-guide", + destination: "/zh/u/github_114939201/posts/burnout-guide", + statusCode: 301, + }, // community 根(内容搬空后)→ learn(泛学习入口) { source: "/docs/community", @@ -296,13 +307,15 @@ const config = { statusCode: 301, }, { + // life/ 下只有 unsw,已有精确 slug 301;wildcard 兜底指 learn 防其他旧 URL 404 source: "/docs/CommunityShare/Life/:path*", - destination: "/zh/docs/community/life/:path*", + destination: "/zh/docs/learn", statusCode: 301, }, { + // mental-health/ 下只有 burnout,已有精确 slug 301;wildcard 兜底指 learn source: "/docs/CommunityShare/MentalHealth/:path*", - destination: "/zh/docs/community/mental-health/:path*", + destination: "/zh/docs/learn", statusCode: 301, }, { From c406f09770906155082174b6d9841f4769d1038c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 17:17:35 +0000 Subject: [PATCH 3/4] =?UTF-8?q?fix(redirect):=20CommunityShare=20=E6=A0=B9?= =?UTF-8?q?=E5=85=9C=E5=BA=95=E6=94=B9=E6=8C=87=20/zh/docs/learn=EF=BC=88p?= =?UTF-8?q?m=20CR=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /docs/CommunityShare → /zh/docs/community 会 404,community 已废弃。 改为 → /zh/docs/learn。 --- next.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 95ebd8d1..842a8538 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -205,7 +205,7 @@ const config = { // CommunityShare / Amazing-AI-Tools index 顶层 { source: "/docs/CommunityShare", - destination: "/zh/docs/community", + destination: "/zh/docs/learn", statusCode: 301, }, { From 70a57281dec071569f2b3e787bb4bf973fb0dea5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 17:21:42 +0000 Subject: [PATCH 4/4] =?UTF-8?q?fix(redirect+docs):=20=E8=A1=A5=20language/?= =?UTF-8?q?papers=20=E7=B2=BE=E7=A1=AE=20index=20301=20+=20=E5=88=A0=20syn?= =?UTF-8?q?cedFromPosts=20=E6=AD=BB=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copilot CR(#351): - next.config.mjs:language / papers 各补一条无 :path* 的精确 index 规则, 防止空路径命中 :path* wildcard 产生尾斜杠,避免 301→308 双跳。 - page.tsx:删 syncedFromPosts eyebrow 渲染块(删+301 路线已无 doc 携带该字段)。 - doc.ts:删 PageData 的 syncedFromPosts / syncedAuthor / syncedPostsUrl 字段(死代码)。 Co-authored-by: copilot-pull-request-reviewer[bot] <198982749+copilot-pull-request-reviewer[bot]@users.noreply.github.com> --- app/[locale]/docs/[...slug]/page.tsx | 11 ----------- app/types/doc.ts | 5 ----- next.config.mjs | 14 ++++++++++++-- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/app/[locale]/docs/[...slug]/page.tsx b/app/[locale]/docs/[...slug]/page.tsx index 2dfc5bb3..6b769e27 100644 --- a/app/[locale]/docs/[...slug]/page.tsx +++ b/app/[locale]/docs/[...slug]/page.tsx @@ -126,17 +126,6 @@ export default async function DocPage({ params }: Param) { /> - {data.syncedFromPosts && data.syncedPostsUrl && ( -

- 此文同步自作者主页 →{" "} - - {data.syncedAuthor ? `${data.syncedAuthor} 的文章` : "原文"} - -

- )}

{page.data.title} diff --git a/app/types/doc.ts b/app/types/doc.ts index 01b53292..557c2168 100644 --- a/app/types/doc.ts +++ b/app/types/doc.ts @@ -39,11 +39,6 @@ export interface PageData { lang?: string; [key: string]: unknown; }; - // docs 文章同步自作者 posts 主页时在 frontmatter 设置, - // 渲染层据此在文章顶部加「此文同步自作者主页 →」导航提示。 - syncedFromPosts?: boolean; - syncedAuthor?: string; - syncedPostsUrl?: string; // 故意不挂顶层 [key: string]: unknown 索引签名 —— Fumadocs 的 page.data 由 // zod DocOut 推出,没有 index signature;如果在 PageData 上挂一个,as PageData // 会触发 TS2352 "neither type sufficiently overlaps"。所有需要的字段都已 diff --git a/next.config.mjs b/next.config.mjs index 842a8538..40944e4c 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -227,13 +227,23 @@ const config = { destination: "/zh/docs/learn/cs/dev-tips/:path*", statusCode: 301, }, - // language(语言考试)→ career/language + // language(语言考试)→ career/language;精确 index + wildcard 各一条,防空路径双跳 + { + source: "/docs/community/language", + destination: "/zh/docs/career/language", + statusCode: 301, + }, { source: "/docs/community/language/:path*", destination: "/zh/docs/career/language/:path*", statusCode: 301, }, - // papers(AI 论文读书笔记)→ learn/ai/papers + // papers(AI 论文读书笔记)→ learn/ai/papers;同上 + { + source: "/docs/community/papers", + destination: "/zh/docs/learn/ai/papers", + statusCode: 301, + }, { source: "/docs/community/papers/:path*", destination: "/zh/docs/learn/ai/papers/:path*",