File tree 3 files changed +206
-194
lines changed
3 files changed +206
-194
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,16 @@ export default defineUserConfig({
101
101
]
102
102
} , false ) ,
103
103
searchProPlugin ( { } ) ,
104
- autoCatalogPlugin ( { } ) ,
104
+ autoCatalogPlugin ( {
105
+ orderGetter : ( { title, routeMeta } ) => {
106
+ if ( routeMeta . order ) return routeMeta . order as number
107
+ const prefix = title . match ( / ^ \d + . / )
108
+ if ( prefix ) return parseInt ( prefix [ 0 ] )
109
+ const suffix = title . match ( / \d + $ / )
110
+ if ( suffix ) return parseInt ( suffix [ 0 ] )
111
+ return 0
112
+ }
113
+ } ) ,
105
114
copyCodePlugin ( {
106
115
showInMobile : true
107
116
} ) ,
Original file line number Diff line number Diff line change 25
25
"@vuepress/utils" : " 2.0.0-beta.61" ,
26
26
"vue" : " ^3.2.47" ,
27
27
"vuepress" : " 2.0.0-beta.61" ,
28
- "vuepress-plugin-auto-catalog" : " 2.0.0-beta.193 " ,
29
- "vuepress-plugin-copy-code2" : " 2.0.0-beta.193 " ,
30
- "vuepress-plugin-md-enhance" : " 2.0.0-beta.193 " ,
31
- "vuepress-plugin-search-pro" : " 2.0.0-beta.193 "
28
+ "vuepress-plugin-auto-catalog" : " 2.0.0-beta.199 " ,
29
+ "vuepress-plugin-copy-code2" : " 2.0.0-beta.199 " ,
30
+ "vuepress-plugin-md-enhance" : " 2.0.0-beta.199 " ,
31
+ "vuepress-plugin-search-pro" : " 2.0.0-beta.199 "
32
32
}
33
33
}
You can’t perform that action at this time.
0 commit comments