File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,17 +126,6 @@ export default async function DocPage({ params }: Param) {
126126 />
127127 < DocsPage toc = { page . data . toc } >
128128 < DocsBody >
129- { data . syncedFromPosts && data . syncedPostsUrl && (
130- < p className = "font-mono text-[10px] uppercase tracking-widest text-neutral-500 mb-4" >
131- 此文同步自作者主页 →{ " " }
132- < a
133- href = { data . syncedPostsUrl }
134- className = "underline hover:text-neutral-700 dark:hover:text-neutral-300 transition-colors"
135- >
136- { data . syncedAuthor ? `${ data . syncedAuthor } 的文章` : "原文" }
137- </ a >
138- </ p >
139- ) }
140129 < div className = "mb-6 flex flex-col gap-3 border-b border-border pb-6 md:mb-8 md:flex-row md:items-start md:justify-between" >
141130 < h1 className = "text-3xl font-extrabold tracking-tight md:text-4xl" >
142131 { page . data . title }
Original file line number Diff line number Diff line change @@ -39,11 +39,6 @@ export interface PageData {
3939 lang ?: string ;
4040 [ key : string ] : unknown ;
4141 } ;
42- // docs 文章同步自作者 posts 主页时在 frontmatter 设置,
43- // 渲染层据此在文章顶部加「此文同步自作者主页 →」导航提示。
44- syncedFromPosts ?: boolean ;
45- syncedAuthor ?: string ;
46- syncedPostsUrl ?: string ;
4742 // 故意不挂顶层 [key: string]: unknown 索引签名 —— Fumadocs 的 page.data 由
4843 // zod DocOut 推出,没有 index signature;如果在 PageData 上挂一个,as PageData
4944 // 会触发 TS2352 "neither type sufficiently overlaps"。所有需要的字段都已
Original file line number Diff line number Diff line change @@ -227,13 +227,23 @@ const config = {
227227 destination : "/zh/docs/learn/cs/dev-tips/:path*" ,
228228 statusCode : 301 ,
229229 } ,
230- // language(语言考试)→ career/language
230+ // language(语言考试)→ career/language;精确 index + wildcard 各一条,防空路径双跳
231+ {
232+ source : "/docs/community/language" ,
233+ destination : "/zh/docs/career/language" ,
234+ statusCode : 301 ,
235+ } ,
231236 {
232237 source : "/docs/community/language/:path*" ,
233238 destination : "/zh/docs/career/language/:path*" ,
234239 statusCode : 301 ,
235240 } ,
236- // papers(AI 论文读书笔记)→ learn/ai/papers
241+ // papers(AI 论文读书笔记)→ learn/ai/papers;同上
242+ {
243+ source : "/docs/community/papers" ,
244+ destination : "/zh/docs/learn/ai/papers" ,
245+ statusCode : 301 ,
246+ } ,
237247 {
238248 source : "/docs/community/papers/:path*" ,
239249 destination : "/zh/docs/learn/ai/papers/:path*" ,
You can’t perform that action at this time.
0 commit comments