mirror of
https://github.com/zitadel/zitadel.git
synced 2025-07-16 13:28:36 +00:00

> [!IMPORTANT] > We need to change the ENV `VERCEL_FORCE_NO_BUILD_CACHE` to `0` which is currently `1` to enable the cache on all deployments This pull request includes several updates to the documentation and benchmarking components, focusing on improving performance, error handling, and compatibility with newer versions of Docusaurus. The key changes include the removal of outdated configurations, updates to dependencies, and enhancements to the `BenchmarkChart` component for better error handling and data validation. ### Documentation and Configuration Updates: * **Removed outdated Babel and Webpack configurations**: The `babel.config.js` file was deleted, and the Webpack configuration was removed from `docusaurus.config.js` to align with the latest Docusaurus setup. [[1]](diffhunk://#diff-2ed4f5b03d34a87ef641e9e36af4a98a1c0ddaf74d07ce93665957be69b7b09aL1-L4) [[2]](diffhunk://#diff-28742c737e523f302e6de471b7fc27284dc8cf720be639e6afe4c17a550cd654L204-L225) * **Added experimental features in Docusaurus**: Introduced a `future` section in `docusaurus.config.js` to enable experimental features like `swcJsLoader`, `rspackBundler`, and `lightningCssMinimizer`, while disabling problematic settings due to known issues. ### Dependency Updates: * **Upgraded Docusaurus and related packages**: Updated dependencies in `package.json` to use Docusaurus version `^3.8.0` and newer versions of associated plugins and themes for improved performance and compatibility. [[1]](diffhunk://#diff-adfa337ce44dc2902621da20152a048dac41878cf3716dfc4cc56d03aa212a56L25-R39) [[2]](diffhunk://#diff-adfa337ce44dc2902621da20152a048dac41878cf3716dfc4cc56d03aa212a56L66-R67) ### Component Enhancements: * **Improved `BenchmarkChart` error handling**: Refactored the `BenchmarkChart` component to validate input data, handle errors gracefully, and provide meaningful fallback messages when data is missing or invalid. [[1]](diffhunk://#diff-ce9fccf51f6b863dd58a39f361a9cf980b10357bccc7381f928788483b30cb0eL4-R21) [[2]](diffhunk://#diff-ce9fccf51f6b863dd58a39f361a9cf980b10357bccc7381f928788483b30cb0eR72-R76) * **Fixed edge cases in chart rendering**: Addressed issues like invalid timestamps, undefined `p99` values, and empty data sets to ensure robust chart generation. [[1]](diffhunk://#diff-ce9fccf51f6b863dd58a39f361a9cf980b10357bccc7381f928788483b30cb0eL19-L29) [[2]](diffhunk://#diff-ce9fccf51f6b863dd58a39f361a9cf980b10357bccc7381f928788483b30cb0eL38-R61) ### Documentation Benchmark Updates: * **Simplified imports in benchmark files**: Replaced the use of `raw-loader` with direct imports for benchmark data in multiple `.mdx` files to streamline the documentation setup. [[1]](diffhunk://#diff-a9710709396e5ff6756aedf89dfcbd62aeea15368ba33bf3932ebf33046a29e8L66-R66) [[2]](diffhunk://#diff-0a9b6103c97c58792450bfd2d337bbb8a6b72df2ae326cc56ebc96e01c0acd6bL35-R35) [[3]](diffhunk://#diff-38f45388e065c57f1282a43bb319354da3c218e96d95ca20f4d11709f48491b8L36-R36) [[4]](diffhunk://#diff-b8e792ebe42fcb16a493e35d23b58a91c2117d949953487e70f379c64e5cb7c0L36-R36) [[5]](diffhunk://#diff-3778acfa893504004008b162fa95f21f1c7c40dcf1868bbbaaa504ac5d51901aL38-R38)
392 lines
12 KiB
JavaScript
392 lines
12 KiB
JavaScript
/** @type {import('@docusaurus/types').DocusaurusConfig} */
|
||
module.exports = {
|
||
title: "ZITADEL Docs",
|
||
trailingSlash: false,
|
||
url: "https://zitadel.com",
|
||
baseUrl: "/docs",
|
||
onBrokenLinks: "warn",
|
||
onBrokenAnchors: "warn",
|
||
onBrokenMarkdownLinks: "throw",
|
||
favicon: "img/favicon.ico",
|
||
organizationName: "zitadel",
|
||
projectName: "zitadel",
|
||
scripts: [
|
||
{
|
||
src: "/docs/proxy/js/script.js",
|
||
async: true,
|
||
defer: true,
|
||
"data-domain": "zitadel.com",
|
||
"data-api": "/docs/proxy/api/event",
|
||
},
|
||
],
|
||
customFields: {
|
||
description:
|
||
"Documentation for ZITADEL - Identity infrastructure, simplified for you.",
|
||
},
|
||
themeConfig: {
|
||
metadata: [
|
||
{
|
||
name: "keywords",
|
||
content:
|
||
"zitadel, documentation, jwt, saml, oauth2, authentication, serverless, login, auth, authorization, sso, openid-connect, oidc, mfa, 2fa, passkeys, fido2, docker",
|
||
},
|
||
{
|
||
property: "og:type",
|
||
content: "website",
|
||
},
|
||
{ property: "og:url", content: "https://www.zitadel.com/docs" },
|
||
{
|
||
property: "og:image",
|
||
content: "https://www.zitadel.com/docs/img/preview.png",
|
||
},
|
||
{ property: "twitter:card", content: "summary_large_image" },
|
||
{ property: "twitter:url", content: "https://www.zitadel.com/docs" },
|
||
{ property: "twitter:title", content: "ZITADEL Docs" },
|
||
{
|
||
property: "twitter:image",
|
||
content: "https://www.zitadel.com/docs/img/preview.png",
|
||
},
|
||
],
|
||
zoom: {
|
||
selector: ".markdown :not(em) > img",
|
||
background: {
|
||
light: "rgb(243, 244, 246)",
|
||
dark: "rgb(55, 59, 82)",
|
||
},
|
||
// options you can specify via https://github.com/francoischalifour/medium-zoom#usage
|
||
config: {},
|
||
},
|
||
navbar: {
|
||
// title: 'ZITADEL',
|
||
logo: {
|
||
alt: "ZITADEL logo",
|
||
src: "img/zitadel-logo-dark.svg",
|
||
srcDark: "img/zitadel-logo-light.svg",
|
||
href: "https://zitadel.com",
|
||
target: "_blank",
|
||
},
|
||
items: [
|
||
{
|
||
type: "doc",
|
||
label: "🚀 Quick Start",
|
||
docId: "guides/start/quickstart",
|
||
position: "left",
|
||
},
|
||
{
|
||
type: "doc",
|
||
label: "Documentation",
|
||
docId: "guides/overview",
|
||
position: "left",
|
||
},
|
||
{
|
||
type: "doc",
|
||
label: "APIs",
|
||
docId: "apis/introduction",
|
||
position: "left",
|
||
},
|
||
{
|
||
type: "doc",
|
||
label: "Self-Hosting",
|
||
docId: "self-hosting/deploy/overview",
|
||
position: "left",
|
||
},
|
||
{
|
||
type: "doc",
|
||
docId: "legal",
|
||
label: "Legal",
|
||
position: "right",
|
||
},
|
||
{
|
||
type: "html",
|
||
position: "right",
|
||
value:
|
||
'<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>',
|
||
},
|
||
{
|
||
type: "html",
|
||
position: "right",
|
||
value:
|
||
'<a href="https://github.com/zitadel/zitadel" style="text-decoration: none; width: 20px; height: 24px; display: flex"><i class="lab la-github"></i></a>',
|
||
},
|
||
{
|
||
type: "html",
|
||
position: "right",
|
||
value:
|
||
'<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>',
|
||
},
|
||
],
|
||
},
|
||
footer: {
|
||
links: [
|
||
{
|
||
title: "Community",
|
||
items: [
|
||
{
|
||
label: "Chat",
|
||
href: "https://zitadel.com/chat",
|
||
},
|
||
{
|
||
label: "GitHub Discussions",
|
||
href: "https://github.com/zitadel/zitadel/discussions",
|
||
},
|
||
{
|
||
label: "Twitter",
|
||
href: "https://twitter.com/zitadel",
|
||
},
|
||
{
|
||
label: "Linkedin",
|
||
href: "https://www.linkedin.com/company/zitadel/",
|
||
},
|
||
{
|
||
label: "Blog",
|
||
href: "https://zitadel.com/blog",
|
||
},
|
||
],
|
||
},
|
||
{
|
||
title: "Legal",
|
||
items: [
|
||
{
|
||
label: "Terms and Conditions",
|
||
href: "/legal/terms-of-service",
|
||
},
|
||
{
|
||
label: "Privacy Policy",
|
||
href: "/legal/policies/privacy-policy",
|
||
},
|
||
],
|
||
},
|
||
{
|
||
title: "About",
|
||
items: [
|
||
{
|
||
label: "Website",
|
||
href: "https://zitadel.com",
|
||
},
|
||
{
|
||
label: "Contact",
|
||
href: "https://zitadel.com/contact/",
|
||
},
|
||
{
|
||
label: "GitHub",
|
||
href: "https://github.com/zitadel",
|
||
},
|
||
{
|
||
label: "Status",
|
||
href: "https://status.zitadel.com/",
|
||
}
|
||
],
|
||
},
|
||
],
|
||
copyright: `Copyright © ${new Date().getFullYear()} ZITADEL Docs - Built with Docusaurus.`,
|
||
},
|
||
algolia: {
|
||
appId: "8H6ZKXENLO",
|
||
apiKey: "124fe1c102a184bc6fc70c75dc84f96f",
|
||
indexName: "zitadel",
|
||
selector: "div#",
|
||
},
|
||
prism: {
|
||
additionalLanguages: ["csharp", "dart", "groovy", "regex", "java", "php", "python", "protobuf", "json", "bash"],
|
||
},
|
||
colorMode: {
|
||
defaultMode: "dark",
|
||
disableSwitch: false,
|
||
respectPrefersColorScheme: true,
|
||
},
|
||
codeblock: {
|
||
showGithubLink: true,
|
||
githubLinkLabel: 'View on GitHub',
|
||
showRunmeLink: false,
|
||
runmeLinkLabel: 'Checkout via Runme'
|
||
},
|
||
},
|
||
presets: [
|
||
[
|
||
"classic",
|
||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||
({
|
||
docs: {
|
||
routeBasePath: "/",
|
||
sidebarPath: require.resolve("./sidebars.js"),
|
||
showLastUpdateAuthor: true,
|
||
showLastUpdateTime: true,
|
||
editUrl: "https://github.com/zitadel/zitadel/edit/main/docs/",
|
||
remarkPlugins: [require("mdx-mermaid")],
|
||
|
||
docItemComponent: '@theme/ApiItem'
|
||
},
|
||
theme: {
|
||
customCss: require.resolve("./src/css/custom.css"),
|
||
},
|
||
})
|
||
],
|
||
|
||
],
|
||
plugins: [
|
||
[
|
||
'docusaurus-plugin-openapi-docs',
|
||
{
|
||
id: "apiDocs",
|
||
docsPluginId: "classic",
|
||
config: {
|
||
auth: {
|
||
specPath: ".artifacts/openapi/zitadel/auth.swagger.json",
|
||
outputDir: "docs/apis/resources/auth",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "tag",
|
||
},
|
||
},
|
||
mgmt: {
|
||
specPath: ".artifacts/openapi/zitadel/management.swagger.json",
|
||
outputDir: "docs/apis/resources/mgmt",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "tag",
|
||
},
|
||
},
|
||
admin: {
|
||
specPath: ".artifacts/openapi/zitadel/admin.swagger.json",
|
||
outputDir: "docs/apis/resources/admin",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "tag",
|
||
},
|
||
},
|
||
system: {
|
||
specPath: ".artifacts/openapi/zitadel/system.swagger.json",
|
||
outputDir: "docs/apis/resources/system",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "tag",
|
||
},
|
||
},
|
||
user_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/user/v2/user_service.swagger.json",
|
||
outputDir: "docs/apis/resources/user_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
session_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/session/v2/session_service.swagger.json",
|
||
outputDir: "docs/apis/resources/session_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
oidc_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/oidc/v2/oidc_service.swagger.json",
|
||
outputDir: "docs/apis/resources/oidc_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
saml_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/saml/v2/saml_service.swagger.json",
|
||
outputDir: "docs/apis/resources/saml_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
settings_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/settings/v2/settings_service.swagger.json",
|
||
outputDir: "docs/apis/resources/settings_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
action_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/action/v2beta/action_service.swagger.json",
|
||
outputDir: "docs/apis/resources/action_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
webkey_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/webkey/v2beta/webkey_service.swagger.json",
|
||
outputDir: "docs/apis/resources/webkey_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
feature_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/feature/v2/feature_service.swagger.json",
|
||
outputDir: "docs/apis/resources/feature_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
org_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/org/v2/org_service.swagger.json",
|
||
outputDir: "docs/apis/resources/org_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
idp_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/idp/v2/idp_service.swagger.json",
|
||
outputDir: "docs/apis/resources/idp_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
project_v2beta: {
|
||
specPath: ".artifacts/openapi/zitadel/project/v2beta/project_service.swagger.json",
|
||
outputDir: "docs/apis/resources/project_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
instance_v2: {
|
||
specPath: ".artifacts/openapi/zitadel/instance/v2beta/instance_service.swagger.json",
|
||
outputDir: "docs/apis/resources/instance_service_v2",
|
||
sidebarOptions: {
|
||
groupPathsBy: "tag",
|
||
categoryLinkSource: "auto",
|
||
},
|
||
},
|
||
},
|
||
},
|
||
],
|
||
require.resolve("docusaurus-plugin-image-zoom"),
|
||
async function myPlugin(context, options) {
|
||
return {
|
||
name: "docusaurus-tailwindcss",
|
||
configurePostCss(postcssOptions) {
|
||
// Appends TailwindCSS and AutoPrefixer.
|
||
postcssOptions.plugins.push(require("tailwindcss"));
|
||
postcssOptions.plugins.push(require("autoprefixer"));
|
||
return postcssOptions;
|
||
},
|
||
};
|
||
},
|
||
],
|
||
themes: [ "docusaurus-theme-github-codeblock", "docusaurus-theme-openapi-docs"],
|
||
future: {
|
||
v4: false, // Disabled because of some problems related to https://github.com/facebook/docusaurus/issues/11040
|
||
experimental_faster: {
|
||
swcJsLoader: false, // Disabled because of memory usage > 8GB which is a problem on vercel default runners
|
||
swcJsMinimizer: true,
|
||
swcHtmlMinimizer : true,
|
||
lightningCssMinimizer: true,
|
||
mdxCrossCompilerCache: true,
|
||
ssgWorkerThreads: false, // Disabled because of some problems related to https://github.com/facebook/docusaurus/issues/11040
|
||
rspackBundler: true,
|
||
rspackPersistentCache: true,
|
||
},
|
||
},
|
||
};
|