@@ -25,6 +25,52 @@ const docsearchOptions =
2525const MIN_META_DESCRIPTION_LENGTH = 150 ;
2626const MAX_META_DESCRIPTION_LENGTH = 160 ;
2727
28+ // Keep high-value legacy URLs found in Search Console working after file moves.
29+ // The redirect plugin normalizes directory-style sources to `index.html`.
30+ const legacyRedirects = {
31+ "/ai/ai-coding/cc-glm5.1.html" : "/ai-coding/cases/cc-glm5.1.html" ,
32+ "/ai/ai-coding/trae-m2.7.html" : "/ai-coding/cases/trae-m2.7.html" ,
33+ "/ai/llm-basis/ai-ide.html" : "/ai-coding/practices/ai-ide.html" ,
34+ "/category/分布式系统/" : "/distributed-system/" ,
35+ "/cs-basics/data-structure/bloom-filter/" :
36+ "/cs-basics/data-structure/bloom-filter.html" ,
37+ "/cs-basics/network/osi&tcp-ip-model.html" :
38+ "/cs-basics/network/osi-and-tcp-ip-model.html" ,
39+ "/database/mysql/mysql知识点&面试题总结/" :
40+ "/database/mysql/mysql-questions-01.html" ,
41+ "/distributed-system/protocol/gossip-protocl.html" :
42+ "/distributed-system/protocol/gossip-protocol.html" ,
43+ "/distributed-system/theorem&algorithm&protocol/cap&base-theorem.html" :
44+ "/distributed-system/protocol/cap-and-base-theorem.html" ,
45+ "/distributed-system/theorem&algorithm&protocol/paxos-algorithm.html" :
46+ "/distributed-system/protocol/paxos-algorithm.html" ,
47+ "/distributed-system/theorem&algorithm&protocol/raft-algorithm.html" :
48+ "/distributed-system/protocol/raft-algorithm.html" ,
49+ "/distributed-system/理论&算法/paxos&raft算法/" :
50+ "/distributed-system/protocol/" ,
51+ "/high-performance/读写分离&分库分表/" :
52+ "/high-performance/read-and-write-separation-and-library-subtable.html" ,
53+ "/interview-preparation/java-interview-plan.html" :
54+ "/interview-preparation/backend-interview-plan.html" ,
55+ "/java/basis/why-there-only-value-passing-in-java/" :
56+ "/java/basis/why-there-only-value-passing-in-java.html" ,
57+ "/java/collection/arraylist-source-code/" :
58+ "/java/collection/arraylist-source-code.html" ,
59+ "/java/collection/concurrent-hash-map-source-code/" :
60+ "/java/collection/concurrent-hash-map-source-code.html" ,
61+ "/java/collection/hashmap-source-code/" :
62+ "/java/collection/hashmap-source-code.html" ,
63+ "/java/concurrent/java并发进阶常见面试题总结/" :
64+ "/java/concurrent/java-concurrent-questions-02.html" ,
65+ "/java/jvm/jvm-parameters-intro/" : "/java/jvm/jvm-parameters-intro.html" ,
66+ "/system-design/basis/naming/" : "/system-design/basis/naming.html" ,
67+ "/system-design/framework/netty/" : "/system-design/framework/netty.html" ,
68+ "/system-design/security/advantages&disadvantages-of-jwt.html" :
69+ "/system-design/security/advantages-and-disadvantages-of-jwt.html" ,
70+ "/zh-CN/jwt-authentication-pros-and-cons/" :
71+ "/system-design/security/advantages-and-disadvantages-of-jwt.html" ,
72+ } ;
73+
2874const segmentDisplayNames = {
2975 ai : "AI" ,
3076 "ai-coding" : "AI 编程" ,
@@ -231,6 +277,9 @@ export default hopeTheme({
231277 codeTabs : true ,
232278 mermaid : true ,
233279 gfm : true ,
280+ linksCheck : {
281+ build : "error" ,
282+ } ,
234283 include : {
235284 resolvePath : ( file , cwd ) => {
236285 if ( file . startsWith ( "@" ) )
@@ -447,6 +496,10 @@ export default hopeTheme({
447496 changefreq : "monthly" ,
448497 } ,
449498
499+ redirect : {
500+ config : legacyRedirects ,
501+ } ,
502+
450503 // The upstream copyright plugin can throw during hydration if `#app` is unavailable.
451504 // Keep it disabled until the plugin adds a null-safe mount path.
452505 copyright : false ,
0 commit comments