|
1 |
| -import {themes as prismThemes} from 'prism-react-renderer'; |
2 |
| -import type {Config} from '@docusaurus/types'; |
3 |
| -import type * as Preset from '@docusaurus/preset-classic'; |
| 1 | +import { themes as prismThemes } from "prism-react-renderer"; |
| 2 | +import type { Config } from "@docusaurus/types"; |
| 3 | +import type * as Preset from "@docusaurus/preset-classic"; |
4 | 4 |
|
5 | 5 | const config: Config = {
|
6 |
| - title: 'Cuple RPC', |
7 |
| - tagline: 'Typesharing between frontend and backends made easy. The missing type-safety for full-stack.', |
8 |
| - favicon: 'img/favicon.ico', |
| 6 | + title: "Cuple RPC", |
| 7 | + tagline: |
| 8 | + "Typesharing between frontend and backends made easy. The missing type-safety for full-stack.", |
| 9 | + favicon: "img/favicon.ico", |
9 | 10 |
|
10 | 11 | // Set the production url of your site here
|
11 |
| - url: 'https://fxdave.github.io', |
| 12 | + url: "https://fxdave.github.io", |
12 | 13 | // Set the /<baseUrl>/ pathname under which your site is served
|
13 | 14 | // For GitHub pages deployment, it is often '/<projectName>/'
|
14 |
| - baseUrl: '/cuple', |
| 15 | + baseUrl: "/cuple", |
15 | 16 |
|
16 | 17 | // GitHub pages deployment config.
|
17 | 18 | // If you aren't using GitHub pages, you don't need these.
|
18 |
| - organizationName: 'fxdave', // Usually your GitHub org/user name. |
19 |
| - projectName: 'cuple', // Usually your repo name. |
| 19 | + organizationName: "fxdave", // Usually your GitHub org/user name. |
| 20 | + projectName: "cuple", // Usually your repo name. |
20 | 21 |
|
21 |
| - onBrokenLinks: 'throw', |
22 |
| - onBrokenMarkdownLinks: 'warn', |
| 22 | + onBrokenLinks: "throw", |
| 23 | + onBrokenMarkdownLinks: "warn", |
23 | 24 |
|
24 | 25 | // Even if you don't use internationalization, you can use this field to set
|
25 | 26 | // useful metadata like html lang. For example, if your site is Chinese, you
|
26 | 27 | // may want to replace "en" with "zh-Hans".
|
27 | 28 | i18n: {
|
28 |
| - defaultLocale: 'en', |
29 |
| - locales: ['en'], |
| 29 | + defaultLocale: "en", |
| 30 | + locales: ["en"], |
30 | 31 | },
|
31 | 32 |
|
32 | 33 | presets: [
|
33 | 34 | [
|
34 |
| - 'classic', |
| 35 | + "classic", |
35 | 36 | {
|
36 | 37 | docs: {
|
37 |
| - sidebarPath: './sidebars.ts', |
| 38 | + sidebarPath: "./sidebars.ts", |
38 | 39 | // Please change this to your repo.
|
39 | 40 | // Remove this to remove the "edit this page" links.
|
40 |
| - editUrl: |
41 |
| - 'https://github.com/fxdave/cuple/tree/main/docs', |
| 41 | + editUrl: "https://github.com/fxdave/cuple/tree/main/docs", |
42 | 42 | },
|
43 | 43 | theme: {
|
44 |
| - customCss: './src/css/custom.css', |
| 44 | + customCss: "./src/css/custom.css", |
45 | 45 | },
|
46 | 46 | } satisfies Preset.Options,
|
47 | 47 | ],
|
48 | 48 | ],
|
49 |
| - |
| 49 | + themes: [ |
| 50 | + // ... Your other themes. |
| 51 | + [ |
| 52 | + require.resolve("@easyops-cn/docusaurus-search-local"), |
| 53 | + /** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */ |
| 54 | + { |
| 55 | + // ... Your options. |
| 56 | + // `hashed` is recommended as long-term-cache of index file is possible. |
| 57 | + hashed: true, |
| 58 | + // For Docs using Chinese, The `language` is recommended to set to: |
| 59 | + // ``` |
| 60 | + // language: ["en", "zh"], |
| 61 | + // ``` |
| 62 | + }, |
| 63 | + ], |
| 64 | + ], |
50 | 65 | themeConfig: {
|
51 | 66 | colorMode: {
|
52 |
| - defaultMode: 'dark', |
| 67 | + defaultMode: "dark", |
53 | 68 | },
|
54 | 69 | // Replace with your project's social card
|
55 |
| - image: 'img/cuple_compact_light_export.svg', |
| 70 | + image: "img/cuple_compact_light_export.svg", |
56 | 71 | navbar: {
|
57 | 72 | logo: {
|
58 |
| - alt: 'Cuple', |
59 |
| - src: 'img/cuple_light_export.svg', |
60 |
| - srcDark: 'img/cuple_dark_export.svg', |
| 73 | + alt: "Cuple", |
| 74 | + src: "img/cuple_light_export.svg", |
| 75 | + srcDark: "img/cuple_dark_export.svg", |
61 | 76 | },
|
62 | 77 | items: [
|
63 | 78 | {
|
64 |
| - type: 'docSidebar', |
65 |
| - sidebarId: 'clientSidebar', |
66 |
| - position: 'left', |
67 |
| - label: 'Client Docs', |
| 79 | + type: "docSidebar", |
| 80 | + sidebarId: "clientSidebar", |
| 81 | + position: "left", |
| 82 | + label: "Client Docs", |
| 83 | + }, |
| 84 | + { |
| 85 | + type: "docSidebar", |
| 86 | + sidebarId: "serverSidebar", |
| 87 | + position: "left", |
| 88 | + label: "Server Docs", |
| 89 | + }, |
| 90 | + { |
| 91 | + href: "https://github.com/fxdave/react-express-cuple-boilerplate", |
| 92 | + label: "Try the Boilerplate", |
| 93 | + position: "right", |
68 | 94 | },
|
69 | 95 | {
|
70 |
| - type: 'docSidebar', |
71 |
| - sidebarId: 'serverSidebar', |
72 |
| - position: 'left', |
73 |
| - label: 'Server Docs', |
| 96 | + href: "https://stackblitz.com/~/github.com/fxdave/react-express-cuple-boilerplate/tree/stackblitz?file=backend/src/index.ts", |
| 97 | + label: "Try in StackBlitz", |
| 98 | + position: "right", |
74 | 99 | },
|
75 | 100 | {
|
76 |
| - href: 'https://github.com/fxdave/cuple', |
77 |
| - label: 'GitHub', |
78 |
| - position: 'right', |
| 101 | + href: "https://github.com/fxdave/cuple", |
| 102 | + label: "GitHub", |
| 103 | + position: "right", |
79 | 104 | },
|
80 | 105 | ],
|
81 | 106 | },
|
82 | 107 | footer: {
|
83 |
| - style: 'light', |
| 108 | + style: "light", |
84 | 109 | logo: {
|
85 |
| - srcDark: '/img/cuple_dark_export.svg', |
86 |
| - src: '/img/cuple_light_export.svg', |
87 |
| - height: '100px' |
| 110 | + srcDark: "/img/cuple_dark_export.svg", |
| 111 | + src: "/img/cuple_light_export.svg", |
| 112 | + height: "100px", |
88 | 113 | },
|
89 | 114 | copyright: `This page is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License. Built with Docusaurus.`,
|
90 | 115 | },
|
91 | 116 | prism: {
|
92 |
| - theme: prismThemes.github, |
93 |
| - darkTheme: prismThemes.dracula, |
| 117 | + theme: prismThemes.vsDark, |
| 118 | + darkTheme: prismThemes.vsDark, |
94 | 119 | },
|
95 | 120 | } satisfies Preset.ThemeConfig,
|
96 | 121 | };
|
|
0 commit comments