chore: use defineConfig to statically type our .vuepress/config

This commit is contained in:
Matan Kushner 2022-07-07 13:31:14 -04:00
parent 5b24d295f8
commit e4fa652169
No known key found for this signature in database
GPG Key ID: BFF10DF8EAA776DD
1 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,6 @@
const sidebar = (lang, override = {}) => import { defineConfig, SidebarConfigArray } from "vuepress/config";
const sidebar = (lang, override = {}): SidebarConfigArray =>
[ [
"", // "Home", which should always have a override "", // "Home", which should always have a override
"guide", // README, which should always have a override "guide", // README, which should always have a override
@ -23,7 +25,7 @@ const sidebar = (lang, override = {}) =>
return page in override ? [path, override[page]] : path; return page in override ? [path, override[page]] : path;
}); });
module.exports = { module.exports = defineConfig({
locales: { locales: {
"/": { "/": {
lang: "en-US", lang: "en-US",
@ -331,11 +333,11 @@ module.exports = {
}, },
], ],
[ [
"sitemap", "vuepress-plugin-sitemap",
{ {
hostname: "https://starship.rs", hostname: "https://starship.rs",
}, },
], ],
["vuepress-plugin-code-copy", true], ["vuepress-plugin-code-copy", true],
], ],
}; });