Skip to content

Commit e4fa652

Browse files
committed
chore: use defineConfig to statically type our .vuepress/config
1 parent 5b24d29 commit e4fa652

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/.vuepress/config.js docs/.vuepress/config.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
const sidebar = (lang, override = {}) =>
1+
import { defineConfig, SidebarConfigArray } from "vuepress/config";
2+
3+
const sidebar = (lang, override = {}): SidebarConfigArray =>
24
[
35
"", // "Home", which should always have a override
46
"guide", // README, which should always have a override
@@ -23,7 +25,7 @@ const sidebar = (lang, override = {}) =>
2325
return page in override ? [path, override[page]] : path;
2426
});
2527

26-
module.exports = {
28+
module.exports = defineConfig({
2729
locales: {
2830
"/": {
2931
lang: "en-US",
@@ -331,11 +333,11 @@ module.exports = {
331333
},
332334
],
333335
[
334-
"sitemap",
336+
"vuepress-plugin-sitemap",
335337
{
336338
hostname: "https://starship.rs",
337339
},
338340
],
339341
["vuepress-plugin-code-copy", true],
340342
],
341-
};
343+
});

0 commit comments

Comments
 (0)