-
-
Notifications
You must be signed in to change notification settings - Fork 380
/
docusaurus.config.ts
298 lines (292 loc) · 8.19 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
// Copyright © 2022 Ory Corp
// SPDX-License-Identifier: Apache-2.0
import type { Config } from "@docusaurus/types"
import type * as Preset from "@docusaurus/preset-classic"
import lightTheme from "./src/utils/prismLight.mjs"
import darkTheme from "./src/utils/prismDark.mjs"
const enableUserCentrics = false
const config: Config = {
customFields: {
CLOUD_URL: process.env.CLOUD_URL || "https://api.console.ory:8080",
},
title: "Ory",
tagline: "Open Source Identity and Access Infrastructure",
url: `https://www.ory.sh`,
baseUrl: "/docs/",
favicon: "img/favico.png",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
onDuplicateRoutes: "throw",
organizationName: "ory",
projectName: "docs",
markdown: {
format: "detect",
},
staticDirectories: ["src/static"],
themeConfig: {
respectPrefersColorScheme: true,
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4,
},
prism: {
darkTheme: darkTheme,
theme: lightTheme,
additionalLanguages: [
"powershell",
"json",
"json5",
"pug",
"shell-session",
"bash",
"tsx",
"markup-templating",
"php",
"yaml",
"dart",
"csharp",
"cshtml",
"diff",
],
magicComments: [
{
className: "theme-code-block-highlighted-line",
line: "highlight-next-line",
block: { start: "highlight-start", end: "highlight-end" },
},
{
className: "code-block-delete-line",
line: "delete-next-line",
block: { start: "delete-lines-start", end: "delete-lines-end" },
},
{
className: "code-block-add-line",
line: "add-next-line",
block: { start: "add-lines-start", end: "add-lines-end" },
},
{
className: "copyright-2022-ory-corp",
line: "Copyright © 2022 Ory Corp",
},
{
className: "copyright-2023-ory-corp",
line: "Copyright © 2023 Ory Corp",
},
{
className: "spdx-license-identifier",
line: "SPDX-License-Identifier: Apache-2.0",
},
],
} satisfies Preset.ThemeConfig["prism"],
algolia: {
appId: "V2EFIWEJ25",
apiKey: "dc6b220f7d2bcd12da60b9cce431d8c5",
indexName: "ory",
contextualSearch: true,
},
navbar: {
hideOnScroll: false,
logo: {
alt: "Ory",
src: `/docs/img/logos/logo-docs-2023-02-15.svg`,
srcDark: `/docs/img/logos/logo-docs-dark-2023-02-15.svg`,
href: `https://www.ory.sh`,
width: 63,
height: 32,
},
items: [
{
type: "docSidebar",
position: "left",
sidebarId: "docs",
label: "Documentation",
},
{
type: "docSidebar",
position: "left",
sidebarId: "quickstarts-and-tutorials",
label: "Quickstart",
},
{
type: "docSidebar",
position: "left",
sidebarId: "guides",
label: "Guides",
},
{
type: "docSidebar",
position: "left",
sidebarId: "reference",
label: "Reference",
},
{
type: "docSidebar",
position: "left",
sidebarId: "selfhosting",
label: "Self-hosting",
},
{
label: "Need Support?",
position: "right",
items: [
{
to: "https://www.ory.sh/support",
label: "Enterprise Support",
},
{
to: "https://www.ory.sh/docs/search",
label: "Search the docs",
},
{
to: "https://www.ory.sh/chat",
label: "Ory Community Slack",
},
{
to: "https://github.com/orgs/ory/discussions",
label: "GitHub Discussions",
},
{
to: "https://stackoverflow.com/questions/tagged/ory",
label: "Stack Overflow",
},
{
to: "https://www.ory.sh/contact",
label: "Schedule a discovery call",
},
],
},
{
href: `https://github.com/ory`,
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
copyright: `Copyright © ${new Date().getFullYear()} Ory Corp`,
links: [
{
label: "Need Support?",
href: "https://www.ory.sh/support/",
},
{
label: "Search",
href: "https://www.ory.sh/docs/search/",
},
{
label: "Status",
href: "https://status.ory.sh/",
},
{
label: "Privacy",
href: "https://www.ory.sh/privacy",
},
{
label: "Imprint",
href: "https://www.ory.sh/imprint",
},
{
label: "Terms of Service",
href: "https://www.ory.sh/tos",
},
{
label: "Schedule a discovery call",
href: "https://www.ory.sh/contact/",
},
{
html: `<a class="ory-consent-manager footer__link-item" href="#">Consent Preferences</a>`,
},
] satisfies Preset.ThemeConfig["footer"]["links"],
logo: {
alt: "Ory logo in white",
src: "/docs/img/logos/logo-ory-white-2022-11-04.svg",
href: "https://www.ory.sh/",
height: 80,
width: 130.7,
},
},
} satisfies Preset.ThemeConfig,
plugins: [
[
"docusaurus-pushfeedback",
{
project: "7bhe9sxlqg",
buttonPosition: "center-right",
},
],
[
"@docusaurus/plugin-content-docs",
{
path: "docs",
sidebarPath: require.resolve("./src/sidebar.ts"),
editUrl: `https://github.com/ory/docs/edit/master`,
// editCurrentVersion: false,
routeBasePath: "/",
showLastUpdateAuthor: true,
showLastUpdateTime: true,
disableVersioning: false,
include: ["**/*.md", "**/*.mdx", "**/*.jsx", "**/*.tsx"],
docRootComponent: "@theme/DocRoot",
},
],
"@docusaurus/plugin-content-pages",
require.resolve("./src/plugins/docusaurus-polyfill"),
"@docusaurus/plugin-sitemap",
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
// {
// from: ['/','/docs','/docs/'],
// to: '/docs/welcome'
// }
],
},
],
],
presets: [
[
"redocusaurus",
{
specs: [
{
id: "ory-network-api",
spec: "docs/reference/api.json",
},
],
theme: {},
},
],
],
themes: [
[
"@docusaurus/theme-classic",
{
customCss: [require.resolve("./src/css/theme.css")],
},
],
"@docusaurus/theme-search-algolia",
"docusaurus-theme-redoc",
],
scripts: [
// Needed as a workaround for https://answers.netlify.com/t/trailing-slash-missing-on-proxied-netlify-site/36367
"/docs/scripts/redirect.js",
"https://ory.sh/cmp/init.js",
"https://consent.ory.sh/index.js",
{
src: "https://widget.kapa.ai/kapa-widget.bundle.js",
"data-website-id": "e89e7663-df2c-4c7f-974a-1bf8accdd615",
"data-project-name": "Ory",
"data-project-color": "#1A237E",
"data-modal-disclaimer":
"By utilizing this chatbot, you consent to the collection and transmission of data to kapa.ai, which may include your IP address. Please be advised that your privacy and data protection are of utmost importance to us. We assure you that any data collected will be handled in compliance with applicable laws and regulations. For further details on how your data is processed and used, we encourage you to review our Privacy Policy. If you do not agree with these terms, we kindly request that you refrain from using this chatbot.",
"data-modal-title": "Ory Copilot",
"data-button-text": "Help?",
"data-project-logo":
"https://assets.website-files.com/627ba6588811eca90ffd6f2a/6282a6b11450b482db646ed2_hydra.png",
defer: true,
},
],
}
module.exports = config