zitadel

Форк
0
/
docusaurus.config.js 
392 строки · 11.9 Кб
1
/** @type {import('@docusaurus/types').DocusaurusConfig} */
2
module.exports = {
3
  title: "ZITADEL Docs",
4
  trailingSlash: false,
5
  url: "https://zitadel.com",
6
  baseUrl: "/docs",
7
  onBrokenLinks: "warn",
8
  onBrokenAnchors: "warn",
9
  onBrokenMarkdownLinks: "throw",
10
  favicon: "img/favicon.ico",
11
  organizationName: "zitadel",
12
  projectName: "zitadel",
13
  scripts: [
14
    {
15
      src: "/docs/proxy/js/script.js",
16
      async: true,
17
      defer: true,
18
      "data-domain": "zitadel.com",
19
      "data-api": "/docs/proxy/api/event",
20
    },
21
  ],
22
  customFields: {
23
    description:
24
      "Documentation for ZITADEL - Identity infrastructure, simplified for you.",
25
  },
26
  themeConfig: {
27
    metadata: [
28
      {
29
        name: "keywords",
30
        content:
31
          "zitadel, documentation, jwt, saml, oauth2, authentication, serverless, login, auth, authorization, sso, openid-connect, oidc, mfa, 2fa, passkeys, fido2, docker",
32
      },
33
      {
34
        property: "og:type",
35
        content: "website",
36
      },
37
      { property: "og:url", content: "https://www.zitadel.com/docs" },
38
      {
39
        property: "og:image",
40
        content: "https://www.zitadel.com/docs/img/preview.png",
41
      },
42
      { property: "twitter:card", content: "summary_large_image" },
43
      { property: "twitter:url", content: "https://www.zitadel.com/docs" },
44
      { property: "twitter:title", content: "ZITADEL Docs" },
45
      {
46
        property: "twitter:image",
47
        content: "https://www.zitadel.com/docs/img/preview.png",
48
      },
49
    ],
50
    zoom: {
51
      selector: ".markdown :not(em) > img",
52
      background: {
53
        light: "rgb(243, 244, 246)",
54
        dark: "rgb(55, 59, 82)",
55
      },
56
      // options you can specify via https://github.com/francoischalifour/medium-zoom#usage
57
      config: {},
58
    },
59
    navbar: {
60
      // title: 'ZITADEL',
61
      logo: {
62
        alt: "ZITADEL logo",
63
        src: "img/zitadel-logo-dark.svg",
64
        srcDark: "img/zitadel-logo-light.svg",
65
        href: "https://zitadel.com",
66
        target: "_blank",
67
      },
68
      items: [
69
        {
70
          type: "doc",
71
          label: "🚀 Quick Start",
72
          docId: "guides/start/quickstart",
73
          position: "left",
74
        }, 
75
        {
76
          type: "doc",
77
          label: "Documentation",
78
          docId: "guides/overview",
79
          position: "left",
80
        }, 
81
        {
82
          type: "doc",
83
          label: "APIs",
84
          docId: "apis/introduction",
85
          position: "left",
86
        },
87
        {
88
          type: "doc",
89
          label: "Self-Hosting",
90
          docId: "self-hosting/deploy/overview",
91
          position: "left",
92
        },
93
        {
94
          type: "doc",
95
          docId: "legal",
96
          label: "Legal",
97
          position: "right",
98
        },
99
        {
100
          type: "html",
101
          position: "right",
102
          value:
103
            '<a href="https://github.com/zitadel/zitadel/discussions" style="text-decoration: none; width: 20px; height: 24px; display: flex"><i class="las la-comments"></i></a>',
104
        },
105
        {
106
          type: "html",
107
          position: "right",
108
          value:
109
            '<a href="https://github.com/zitadel/zitadel" style="text-decoration: none; width: 20px; height: 24px; display: flex"><i class="lab la-github"></i></a>',
110
        },
111
        {
112
          type: "html",
113
          position: "right",
114
          value:
115
            '<a href="https://zitadel.com/chat" style="text-decoration: none; width: 20px; height: 24px; display: flex; margin: 0 .5rem 0 0"><i class="lab la-discord"></i></a>',
116
        },
117
      ],
118
    },
119
    footer: {
120
      links: [
121
        {
122
          title: "Community",
123
          items: [
124
            {
125
              label: "Chat",
126
              href: "https://zitadel.com/chat",
127
            },
128
            {
129
              label: "GitHub Discussions",
130
              href: "https://github.com/zitadel/zitadel/discussions",
131
            },
132
            {
133
              label: "Twitter",
134
              href: "https://twitter.com/zitadel",
135
            },
136
            {
137
              label: "Linkedin",
138
              href: "https://www.linkedin.com/company/zitadel/",
139
            },
140
            {
141
              label: "Blog",
142
              href: "https://zitadel.com/blog",
143
            },
144
          ],
145
        },
146
        {
147
          title: "Legal",
148
          items: [
149
            {
150
              label: "Terms and Conditions",
151
              href: "/legal/terms-of-service",
152
            },
153
            {
154
              label: "Privacy Policy",
155
              href: "/legal/policies/privacy-policy",
156
            },
157
          ],
158
        },
159
        {
160
          title: "About",
161
          items: [
162
            {
163
              label: "Website",
164
              href: "https://zitadel.com",
165
            },
166
            {
167
              label: "Contact",
168
              href: "https://zitadel.com/contact/",
169
            },
170
            {
171
              label: "GitHub",
172
              href: "https://github.com/zitadel",
173
            },
174
            {
175
              label: "Status",
176
              href: "https://status.zitadel.com/",
177
            }
178
          ],
179
        },
180
      ],
181
      copyright: `Copyright © ${new Date().getFullYear()} ZITADEL Docs - Built with Docusaurus.`,
182
    },
183
    algolia: {
184
      appId: "8H6ZKXENLO",
185
      apiKey: "124fe1c102a184bc6fc70c75dc84f96f",
186
      indexName: "zitadel",
187
      selector: "div#",
188
    },
189
    prism: {
190
      additionalLanguages: ["csharp", "dart", "groovy", "regex", "java", "php", "python", "protobuf", "json", "bash"],
191
    },
192
    colorMode: {
193
      defaultMode: "dark",
194
      disableSwitch: false,
195
      respectPrefersColorScheme: true,
196
    },
197
    codeblock: {
198
      showGithubLink: true,
199
      githubLinkLabel: 'View on GitHub',
200
      showRunmeLink: false,
201
      runmeLinkLabel: 'Checkout via Runme'
202
    },
203
  },
204
  webpack: {
205
    jsLoader: (isServer) => ({
206
      loader: require.resolve('swc-loader'),
207
      options: {
208
        jsc: {
209
          parser: {
210
            syntax: 'typescript',
211
            tsx: true,
212
          },
213
          transform: {
214
            react: {
215
              runtime: 'automatic',
216
            },
217
          },
218
          target: 'es2017',
219
        },
220
        module: {
221
          type: isServer ? 'commonjs' : 'es6',
222
        },
223
      },
224
    }),
225
  },
226
  presets: [
227
    [
228
      "classic",
229
      /** @type {import('@docusaurus/preset-classic').Options} */
230
      ({
231
        docs: {
232
          routeBasePath: "/",
233
          sidebarPath: require.resolve("./sidebars.js"),
234
          showLastUpdateAuthor: true,
235
          showLastUpdateTime: true,
236
          editUrl: "https://github.com/zitadel/zitadel/edit/main/docs/",
237
          remarkPlugins: [require("mdx-mermaid")],
238
          
239
          docItemComponent:  '@theme/ApiItem'
240
        },
241
        theme: {
242
          customCss: require.resolve("./src/css/custom.css"),
243
        },
244
      })
245
    ],
246

247
  ],
248
  plugins: [
249
    [
250
      'docusaurus-plugin-openapi-docs',
251
      {
252
        id: "apiDocs",
253
        docsPluginId: "classic",
254
        config: {
255
          auth: {
256
            specPath: ".artifacts/openapi/zitadel/auth.swagger.json",
257
            outputDir: "docs/apis/resources/auth",
258
            sidebarOptions: {
259
              groupPathsBy: "tag",
260
              categoryLinkSource: "tag",
261
            },
262
          },
263
          mgmt: {
264
            specPath: ".artifacts/openapi/zitadel/management.swagger.json",
265
            outputDir: "docs/apis/resources/mgmt",
266
            sidebarOptions: {
267
              groupPathsBy: "tag",
268
              categoryLinkSource: "tag",
269
            },
270
          },
271
          admin: {
272
            specPath: ".artifacts/openapi/zitadel/admin.swagger.json",
273
            outputDir: "docs/apis/resources/admin",
274
            sidebarOptions: {
275
              groupPathsBy: "tag",
276
              categoryLinkSource: "tag",
277
            },
278
          },
279
          system: {
280
            specPath: ".artifacts/openapi/zitadel/system.swagger.json",
281
            outputDir: "docs/apis/resources/system",
282
            sidebarOptions: {
283
              groupPathsBy: "tag",
284
              categoryLinkSource: "tag",
285
            },
286
          },
287
          user_v2: {
288
            specPath: ".artifacts/openapi/zitadel/user/v2/user_service.swagger.json",
289
            outputDir: "docs/apis/resources/user_service_v2",
290
            sidebarOptions: {
291
              groupPathsBy: "tag",
292
              categoryLinkSource: "tag",
293
            },
294
          },
295
          session_v2: {
296
            specPath: ".artifacts/openapi/zitadel/session/v2/session_service.swagger.json",
297
            outputDir: "docs/apis/resources/session_service_v2",
298
            sidebarOptions: {
299
              groupPathsBy: "tag",
300
              categoryLinkSource: "tag",
301
            },
302
          },
303
          oidc_v2: {
304
            specPath: ".artifacts/openapi/zitadel/oidc/v2/oidc_service.swagger.json",
305
            outputDir: "docs/apis/resources/oidc_service_v2",
306
            sidebarOptions: {
307
              groupPathsBy: "tag",
308
              categoryLinkSource: "tag",
309
            },
310
          },
311
          settings_v2: {
312
            specPath: ".artifacts/openapi/zitadel/settings/v2/settings_service.swagger.json",
313
            outputDir: "docs/apis/resources/settings_service_v2",
314
            sidebarOptions: {
315
              groupPathsBy: "tag",
316
              categoryLinkSource: "tag",
317
            },
318
          },
319
          user_schema_v3: {
320
            specPath: ".artifacts/openapi/zitadel/resources/userschema/v3alpha/user_schema_service.swagger.json",
321
            outputDir: "docs/apis/resources/user_schema_service_v3",
322
            sidebarOptions: {
323
              groupPathsBy: "tag",
324
              categoryLinkSource: "auto",
325
            },
326
          },
327
          user_v3: {
328
            specPath: ".artifacts/openapi/zitadel/resources/user/v3alpha/user_service.swagger.json",
329
            outputDir: "docs/apis/resources/user_service_v3",
330
            sidebarOptions: {
331
              groupPathsBy: "tag",
332
              categoryLinkSource: "auto",
333
            },
334
          },
335
          action_v3: {
336
            specPath: ".artifacts/openapi/zitadel/resources/action/v3alpha/action_service.swagger.json",
337
            outputDir: "docs/apis/resources/action_service_v3",
338
            sidebarOptions: {
339
                groupPathsBy: "tag",
340
                categoryLinkSource: "auto",
341
            },
342
          },
343
          webkey_v3: {
344
            specPath: ".artifacts/openapi/zitadel/resources/webkey/v3alpha/webkey_service.swagger.json",
345
            outputDir: "docs/apis/resources/webkey_service_v3",
346
            sidebarOptions: {
347
                groupPathsBy: "tag",
348
                categoryLinkSource: "auto",
349
            },
350
          },
351
          feature_v2: {
352
            specPath: ".artifacts/openapi/zitadel/feature/v2/feature_service.swagger.json",
353
            outputDir: "docs/apis/resources/feature_service_v2",
354
            sidebarOptions: {
355
                groupPathsBy: "tag",
356
                categoryLinkSource: "auto",
357
            },
358
          },
359
          org_v2: {
360
            specPath: ".artifacts/openapi/zitadel/org/v2/org_service.swagger.json",
361
            outputDir: "docs/apis/resources/org_service_v2",
362
            sidebarOptions: {
363
              groupPathsBy: "tag",
364
              categoryLinkSource: "auto",
365
            },
366
          },
367
          idp_v2: {
368
            specPath: ".artifacts/openapi/zitadel/idp/v2/idp_service.swagger.json",
369
            outputDir: "docs/apis/resources/idp_service_v2",
370
            sidebarOptions: {
371
              groupPathsBy: "tag",
372
              categoryLinkSource: "auto",
373
            },
374
          },
375
        },
376
      },
377
    ],
378
    require.resolve("docusaurus-plugin-image-zoom"),
379
    async function myPlugin(context, options) {
380
      return {
381
        name: "docusaurus-tailwindcss",
382
        configurePostCss(postcssOptions) {
383
          // Appends TailwindCSS and AutoPrefixer.
384
          postcssOptions.plugins.push(require("tailwindcss"));
385
          postcssOptions.plugins.push(require("autoprefixer"));
386
          return postcssOptions;
387
        },
388
      };
389
    },
390
  ],
391
  themes: [ "docusaurus-theme-github-codeblock", "docusaurus-theme-openapi-docs"],
392
};
393

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.