Skip to content

Commit 289fc1b

Browse files
committed
chore: sync & config
1 parent 72a98f0 commit 289fc1b

File tree

3 files changed

+206
-194
lines changed

3 files changed

+206
-194
lines changed

docs/.vuepress/config.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,16 @@ export default defineUserConfig({
101101
]
102102
}, false),
103103
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+
}),
105114
copyCodePlugin({
106115
showInMobile: true
107116
}),

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"@vuepress/utils": "2.0.0-beta.61",
2626
"vue": "^3.2.47",
2727
"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"
3232
}
3333
}

0 commit comments

Comments
 (0)