-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdocusaurus.config.ts
99 lines (91 loc) · 2.41 KB
/
docusaurus.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import type * as Preset from "@docusaurus/preset-classic";
import type { Config } from "@docusaurus/types";
import { themes as prismThemes } from "prism-react-renderer";
import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
import type * as Plugin from "@docusaurus/types/src/plugin";
const config: Config = {
title: "Pocket ID",
tagline:
"Pocket ID is a simple OIDC provider that allows users to authenticate with their passkeys to your services.",
favicon: "img/logo.png",
url: "https://pocket-id.org",
baseUrl: "/",
organizationName: "pocket-id",
projectName: "website",
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
i18n: {
defaultLocale: "en",
locales: ["en"],
},
presets: [
[
"classic",
{
docs: {
routeBasePath: "/docs",
sidebarPath: "./sidebars.ts",
docItemComponent: "@theme/ApiItem",
editUrl: "https://github.com/pocket-id/website/edit/main",
},
theme: {
customCss: "static/api-styles.css",
},
blog: false,
} satisfies Preset.Options,
],
],
themeConfig: {
image: "img/logo.png",
colorMode: {
respectPrefersColorScheme: true,
},
navbar: {
title: "Pocket ID",
logo: {
alt: "Pocket ID Logo",
src: "img/logo.png",
},
items: [
// Version gets replaced by the version-label.ts script
{
to: "#version",
label: " ",
position: "right",
},
{
href: "https://github.com/pocket-id/pocket-id",
label: "GitHub",
position: "right",
},
],
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
plugins: [
[
"docusaurus-plugin-openapi-docs",
{
id: "openapi",
docsPluginId: "classic",
config: {
pocketid: {
specPath: "static/swagger.yaml",
outputDir: "docs/api/endpoints",
hideSendButton: true,
sidebarOptions: {
groupPathsBy: "tag",
categoryLinkSource: "tag",
},
} satisfies OpenApiPlugin.Options,
} satisfies Plugin.PluginOptions,
},
],
],
clientModules: [require.resolve("./src/version-label.ts")],
themes: ["docusaurus-theme-openapi-docs"],
};
export default config;