/ docs / .vitepress / config.mts
config.mts
 1  import { defineConfig } from "vitepress";
 2  import { loadManifest } from "./scripts/docs-manifest.mjs";
 3  
 4  const manifest = loadManifest();
 5  const docsBase = process.env.DOCS_BASE || "/";
 6  
 7  export default defineConfig({
 8    title: "OpenSandbox",
 9    description: "OpenSandbox documentation site for users and developers",
10    head: [["link", { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }]],
11    cleanUrls: true,
12    lastUpdated: true,
13    base: docsBase,
14    ignoreDeadLinks: [/^https?:\/\/localhost/, /\/README$/, /\/index$/, "./contributing"],
15    srcExclude: ["node_modules/**", "README_zh.md", "RELEASE_NOTE_TEMPLATE.md"],
16    rewrites: manifest.rewrites,
17    themeConfig: {
18      logo: "/assets/logo.svg",
19      search: {
20        provider: "local",
21      },
22      socialLinks: [{ icon: "github", link: "https://github.com/alibaba/OpenSandbox" }],
23      nav: manifest.nav.en,
24      sidebar: {
25        ...manifest.sidebar.en,
26        ...manifest.sidebar.zh,
27      },
28      outline: {
29        level: [2, 3],
30      },
31    },
32    locales: {
33      root: {
34        label: "English",
35        lang: "en-US",
36        themeConfig: {
37          nav: manifest.nav.en,
38        },
39      },
40      zh: {
41        label: "简体中文",
42        lang: "zh-CN",
43        themeConfig: {
44          nav: manifest.nav.zh,
45        },
46      },
47    },
48  });