|
1 | 1 | import { defineConfig } from "vitepress";
|
| 2 | +import { en } from "./en"; |
| 3 | +import { zh } from "./zh"; |
| 4 | +import { shared } from "./shared"; |
2 | 5 |
|
3 |
| -const HOSTNAME = "https://openapi-ts.pages.dev"; |
4 | 6 |
|
5 | 7 | // https://vitepress.dev/reference/site-config
|
6 | 8 | export default defineConfig({
|
7 |
| - title: "OpenAPI TypeScript", |
8 |
| - description: "Consume OpenAPI 3.0 & 3.1 schemas in TypeScript", |
9 |
| - cleanUrls: true, |
10 |
| - srcExclude: ["**/*/CONTRIBUTRING.md", "**/*/README.md"], |
11 |
| - ignoreDeadLinks: [/CODE_OF_CONDUCT/], |
12 |
| - head: [ |
13 |
| - ["link", { rel: "shortcut icon", href: "/favicon.svg", type: "image/svg" }], |
14 |
| - ], |
15 |
| - sitemap: { |
16 |
| - hostname: HOSTNAME, |
17 |
| - }, |
18 |
| - /** @see https://vitepress.dev/reference/default-theme-config */ |
19 |
| - themeConfig: { |
20 |
| - siteTitle: false, |
21 |
| - logo: "/assets/openapi-ts.svg", |
22 |
| - nav: [ |
23 |
| - { |
24 |
| - text: "Versions", |
25 |
| - items: [ |
26 |
| - { text: "7.x", link: "/introduction" }, |
27 |
| - { text: "6.x", link: "/6.x/introduction" }, |
28 |
| - ], |
29 |
| - }, |
30 |
| - ], |
31 |
| - sidebar: { |
32 |
| - // 6.x docs |
33 |
| - "/6.x/": [ |
34 |
| - { |
35 |
| - text: "openapi-typescript (6.x)", |
36 |
| - items: [ |
37 |
| - { text: "Introduction", link: "/6.x/introduction" }, |
38 |
| - { text: "CLI", link: "/6.x/cli" }, |
39 |
| - { text: "Node.js API", link: "/6.x/node" }, |
40 |
| - { text: "Advanced", link: "/6.x/advanced" }, |
41 |
| - { text: "About", link: "/6.x/about" }, |
42 |
| - ], |
43 |
| - }, |
44 |
| - { |
45 |
| - text: "openapi-fetch", |
46 |
| - items: [ |
47 |
| - { text: "Getting Started", link: "/openapi-fetch/" }, |
48 |
| - { |
49 |
| - text: "Middleware & Auth", |
50 |
| - link: "/openapi-fetch/middleware-auth", |
51 |
| - }, |
52 |
| - { text: "Testing", link: "/openapi-fetch/testing" }, |
53 |
| - { text: "Examples", link: "/openapi-fetch/examples" }, |
54 |
| - { text: "API", link: "/openapi-fetch/api" }, |
55 |
| - { text: "About", link: "/openapi-fetch/about" }, |
56 |
| - ], |
57 |
| - }, |
58 |
| - ], |
59 |
| - // default (7.x) docs |
60 |
| - "/": [ |
61 |
| - { |
62 |
| - text: "openapi-typescript (7.x)", |
63 |
| - items: [ |
64 |
| - { text: "Introduction", link: "/introduction" }, |
65 |
| - { text: "CLI", link: "/cli" }, |
66 |
| - { text: "Node.js API", link: "/node" }, |
67 |
| - { text: "Examples", link: "/examples" }, |
68 |
| - { text: "Migrating from 6.x", link: "/migration-guide" }, |
69 |
| - { text: "Advanced", link: "/advanced" }, |
70 |
| - { text: "About", link: "/about" }, |
71 |
| - ], |
72 |
| - }, |
73 |
| - { |
74 |
| - text: "openapi-fetch", |
75 |
| - items: [ |
76 |
| - { text: "Getting Started", link: "/openapi-fetch/" }, |
77 |
| - { |
78 |
| - text: "Middleware & Auth", |
79 |
| - link: "/openapi-fetch/middleware-auth", |
80 |
| - }, |
81 |
| - { text: "Testing", link: "/openapi-fetch/testing" }, |
82 |
| - { text: "Examples", link: "/openapi-fetch/examples" }, |
83 |
| - { text: "API", link: "/openapi-fetch/api" }, |
84 |
| - { text: "About", link: "/openapi-fetch/about" }, |
85 |
| - ], |
86 |
| - }, |
87 |
| - ], |
88 |
| - }, |
89 |
| - search: { |
90 |
| - provider: "algolia", |
91 |
| - options: { |
92 |
| - appId: "NA92XVKBVS", |
93 |
| - apiKey: "4f3ce9ca7edc3b83c209e6656ab29eb8", |
94 |
| - indexName: "openapi-ts", |
95 |
| - }, |
96 |
| - }, |
97 |
| - socialLinks: [ |
98 |
| - { icon: "github", link: "https://github.com/drwpow/openapi-typescript" }, |
99 |
| - ], |
100 |
| - footer: { |
101 |
| - message: |
102 |
| - 'Released under the <a href="https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT License</a>.', |
103 |
| - }, |
104 |
| - }, |
| 9 | + ...shared, |
| 10 | + locales: { |
| 11 | + root: { label: 'English', ...en }, |
| 12 | + zh: { label: '简体中文', ...zh } |
| 13 | + } |
105 | 14 | });
|
0 commit comments