Skip to content

Commit 21c0328

Browse files
committed
Update docs
1 parent 4d02618 commit 21c0328

File tree

5 files changed

+609
-85
lines changed

5 files changed

+609
-85
lines changed

docs/docusaurus.config.ts

+67-42
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,121 @@
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";
44

55
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",
910

1011
// Set the production url of your site here
11-
url: 'https://fxdave.github.io',
12+
url: "https://fxdave.github.io",
1213
// Set the /<baseUrl>/ pathname under which your site is served
1314
// For GitHub pages deployment, it is often '/<projectName>/'
14-
baseUrl: '/cuple',
15+
baseUrl: "/cuple",
1516

1617
// GitHub pages deployment config.
1718
// 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.
2021

21-
onBrokenLinks: 'throw',
22-
onBrokenMarkdownLinks: 'warn',
22+
onBrokenLinks: "throw",
23+
onBrokenMarkdownLinks: "warn",
2324

2425
// Even if you don't use internationalization, you can use this field to set
2526
// useful metadata like html lang. For example, if your site is Chinese, you
2627
// may want to replace "en" with "zh-Hans".
2728
i18n: {
28-
defaultLocale: 'en',
29-
locales: ['en'],
29+
defaultLocale: "en",
30+
locales: ["en"],
3031
},
3132

3233
presets: [
3334
[
34-
'classic',
35+
"classic",
3536
{
3637
docs: {
37-
sidebarPath: './sidebars.ts',
38+
sidebarPath: "./sidebars.ts",
3839
// Please change this to your repo.
3940
// 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",
4242
},
4343
theme: {
44-
customCss: './src/css/custom.css',
44+
customCss: "./src/css/custom.css",
4545
},
4646
} satisfies Preset.Options,
4747
],
4848
],
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+
],
5065
themeConfig: {
5166
colorMode: {
52-
defaultMode: 'dark',
67+
defaultMode: "dark",
5368
},
5469
// Replace with your project's social card
55-
image: 'img/cuple_compact_light_export.svg',
70+
image: "img/cuple_compact_light_export.svg",
5671
navbar: {
5772
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",
6176
},
6277
items: [
6378
{
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",
6894
},
6995
{
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",
7499
},
75100
{
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",
79104
},
80105
],
81106
},
82107
footer: {
83-
style: 'light',
108+
style: "light",
84109
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",
88113
},
89114
copyright: `This page is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License. Built with Docusaurus.`,
90115
},
91116
prism: {
92-
theme: prismThemes.github,
93-
darkTheme: prismThemes.dracula,
117+
theme: prismThemes.vsDark,
118+
darkTheme: prismThemes.vsDark,
94119
},
95120
} satisfies Preset.ThemeConfig,
96121
};

0 commit comments

Comments
 (0)