From 4995228fc0f2325fc9b82a728e18ca64c4ae6549 Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:17:26 -0600 Subject: [PATCH 1/6] formatting --- sidebars.ts | 143 ++++++++++++++++++++++++++-------------------------- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/sidebars.ts b/sidebars.ts index 82247f6402..2f051866fc 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -14,7 +14,7 @@ const sidebars: SidebarsConfig = { // By default, Docusaurus generates a sidebar from the docs folder structure index: ['index'], gettingStarted: [ - { + { type: "category", collapsed: false, collapsible: false, @@ -40,78 +40,79 @@ const sidebars: SidebarsConfig = { collapsed: false, collapsible: false, items: [ - 'orm/orm-index', - { - type: "category", - label: "Overview", - collapsed: false, - items : [{ - type: 'autogenerated', - dirName: '200-orm/050-overview', - }] - }, - { - type: "category", - label: "Prisma Schema", - collapsed: false, - items : [{ - type: 'autogenerated', - dirName: '200-orm/100-prisma-schema' - }] - }, - { - type: "category", - label: "Prisma Client", - collapsed: false, - items : [{ - type: 'autogenerated', - dirName: '200-orm/200-prisma-client' - }] - }, - { - type: "category", - label: "Prisma Migrate", - collapsed: false, - items : [{ - type: 'autogenerated', - dirName: '200-orm/300-prisma-migrate' - }] - }, - { - type: "category", - label: "Tools", - collapsed: false, - items : [{ - type: 'autogenerated', - dirName: '200-orm/400-tools' - }] - }, - { - type: "category", - label: "Reference", - collapsed: false, - items : [{ - type: 'autogenerated', - dirName: '200-orm/500-reference' - }] - }, - { - type: "category", - label: "More", - collapsed: false, - items : [{ - type: 'autogenerated', - dirName: '200-orm/800-more' - }] - } - ]}], + 'orm/orm-index', + { + type: "category", + label: "Overview", + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: '200-orm/050-overview', + }] + }, + { + type: "category", + label: "Prisma Schema", + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: '200-orm/100-prisma-schema' + }] + }, + { + type: "category", + label: "Prisma Client", + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: '200-orm/200-prisma-client' + }] + }, + { + type: "category", + label: "Prisma Migrate", + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: '200-orm/300-prisma-migrate' + }] + }, + { + type: "category", + label: "Tools", + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: '200-orm/400-tools' + }] + }, + { + type: "category", + label: "Reference", + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: '200-orm/500-reference' + }] + }, + { + type: "category", + label: "More", + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: '200-orm/800-more' + }] + } + ] + }], accelerateSidebar: [ { type: "category", label: "Accelerate", collapsed: false, collapsible: false, - items: [{ type: 'autogenerated', dirName: '300-accelerate'}] + items: [{ type: 'autogenerated', dirName: '300-accelerate' }] }, { type: "category", @@ -128,18 +129,18 @@ const sidebars: SidebarsConfig = { type: "category", collapsed: false, label: "Concepts", - items: [{ type: 'autogenerated', dirName: '500-platform/20-concepts'}] + items: [{ type: 'autogenerated', dirName: '500-platform/20-concepts' }] } ] } ], - pulseSidebar: [ + pulseSidebar: [ { type: "category", label: "Pulse", collapsible: false, collapsed: false, - items: [{ type: 'autogenerated', dirName: '400-pulse'}] + items: [{ type: 'autogenerated', dirName: '400-pulse' }] }, { type: "category", @@ -156,7 +157,7 @@ const sidebars: SidebarsConfig = { type: "category", collapsed: false, label: "Concepts", - items: [{ type: 'autogenerated', dirName: '500-platform/20-concepts'}] + items: [{ type: 'autogenerated', dirName: '500-platform/20-concepts' }] } ] } From 98e3f4dc91757ff958ade6e15efd5176e16e64a0 Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:34:46 -0600 Subject: [PATCH 2/6] create new re-usable platform category --- sidebars.ts | 65 ++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/sidebars.ts b/sidebars.ts index 2f051866fc..4c62bcb970 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -1,5 +1,30 @@ import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; +const platformCategory: any = { + type: "category", + label: "Platform", + collapsed: false, + collapsible: false, + items: [ + 'platform/index', + 'platform/about', + { + type: "category", + label: "Concepts", + collapsed: false, + items: [{ type: 'autogenerated', dirName: '500-platform/20-concepts' }] + }, + 'platform/maturity-levels', + 'platform/limits', + 'platform/support', + { + type: 'category', + label: 'Platform CLI', + items: [{ type: 'autogenerated', dirName: '500-platform/60-platform-cli' }], + }, + ], +}; + /** * Creating a sidebar enables you to: - create an ordered group of docs @@ -114,25 +139,7 @@ const sidebars: SidebarsConfig = { collapsible: false, items: [{ type: 'autogenerated', dirName: '300-accelerate' }] }, - { - type: "category", - label: "Platform", - collapsed: false, - collapsible: false, - items: [ - 'platform/about', - 'platform/maturity-levels', - 'platform/limits', - 'platform/support', - 'platform/index', - { - type: "category", - collapsed: false, - label: "Concepts", - items: [{ type: 'autogenerated', dirName: '500-platform/20-concepts' }] - } - ] - } + platformCategory, ], pulseSidebar: [ { @@ -142,25 +149,7 @@ const sidebars: SidebarsConfig = { collapsed: false, items: [{ type: 'autogenerated', dirName: '400-pulse' }] }, - { - type: "category", - label: "Platform", - collapsible: false, - collapsed: false, - items: [ - 'platform/about', - 'platform/maturity-levels', - 'platform/limits', - 'platform/support', - 'platform/index', - { - type: "category", - collapsed: false, - label: "Concepts", - items: [{ type: 'autogenerated', dirName: '500-platform/20-concepts' }] - } - ] - } + platformCategory, ], aboutSidebar: [{ type: 'autogenerated', From 1aa52e358f8ed1d4110c80ad814933fe94d4bf01 Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:57:43 -0600 Subject: [PATCH 3/6] add scripts for kapa and OneTrust --- docusaurus.config.ts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index f95b8c9772..9f509fab95 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -24,7 +24,34 @@ const config: Config = { defaultLocale: 'en', locales: ['en'], }, - + scripts: [ + // kapa.ai script + { + src: 'https://widget.kapa.ai/kapa-widget.bundle.js', + defer: true, + 'data-website-id': '1b51bb03-43cc-4ef4-95f1-93288a91b560', + 'data-project-name': 'Prisma', + 'data-project-color': '#2D3748', + 'data-project-logo': 'https://www.prisma.io/docs/ai_logo.png', + 'data-button-text': 'Ask AI', + 'data-modal-example-questions': + "How can I setup relations in my schema file?,What is the difference between the 'migrate dev' and 'db push' commands?,Which cache strategy should I use for my query with Prisma Accelerate?,How can I subscribe to database events with Prisma Pulse?", + 'data-button-image': 'https://www.prisma.io/docs/ai_button.svg', + 'data-button-text-color': '#71E8DF', + 'data-button-bg-color': '#2D3748', + 'data-button-border': '2px', + 'data-button-border-color': '#71e8df', + 'data-button-border-style': 'solid', + 'data-button-box-shadow': + 'drop-shadow(0px 0.724px 1.251px rgba(14, 18, 28, 0.02)) drop-shadow(0px 1.608px 2.909px rgba(14, 18, 28, 0.04)) drop-shadow(0px 2.793px 5.225px rgba(14, 18, 28, 0.06)) drop-shadow(0px 4.55px 8.671px rgba(14, 18, 28, 0.07)) drop-shadow(0px 7.485px 14.285px rgba(14, 18, 28, 0.08)) drop-shadow(0px 13.358px 24.966px rgba(14, 18, 28, 0.09)) drop-shadow(0px 33px 54px rgba(14, 18, 28, 0.07))', + }, + // OneTrust Cookies Consent Notice start for prisma.io + { + src: 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js', + 'data-document-language': 'true', + 'data-domain-script': '22c2e2c0-3df0-4958-8672-1194370ee230', + }, + ], presets: [ [ 'classic', From 3410daf4c28fea13a49142aab2536f041395ff67 Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Thu, 29 Feb 2024 19:02:41 -0600 Subject: [PATCH 4/6] add gtag and gtm --- docusaurus.config.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 9f509fab95..95aa10edbc 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -55,6 +55,17 @@ const config: Config = { presets: [ [ 'classic', + { + gtag: { + trackingID: 'G-999X9XX9XX', + anonymizeIP: true, + }, + }, + { + googleTagManager: { + containerId: 'GTM-KCGZPWB', + }, + }, { docs: { routeBasePath: '/', From ed9731a6c4fe1c51e39c6cd8bc678f879942b996 Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Fri, 1 Mar 2024 08:44:52 -0600 Subject: [PATCH 5/6] Docusaurus: Kapa.ai and OneTrust scripts (#5690) --- docusaurus.config.ts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index f95b8c9772..9f509fab95 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -24,7 +24,34 @@ const config: Config = { defaultLocale: 'en', locales: ['en'], }, - + scripts: [ + // kapa.ai script + { + src: 'https://widget.kapa.ai/kapa-widget.bundle.js', + defer: true, + 'data-website-id': '1b51bb03-43cc-4ef4-95f1-93288a91b560', + 'data-project-name': 'Prisma', + 'data-project-color': '#2D3748', + 'data-project-logo': 'https://www.prisma.io/docs/ai_logo.png', + 'data-button-text': 'Ask AI', + 'data-modal-example-questions': + "How can I setup relations in my schema file?,What is the difference between the 'migrate dev' and 'db push' commands?,Which cache strategy should I use for my query with Prisma Accelerate?,How can I subscribe to database events with Prisma Pulse?", + 'data-button-image': 'https://www.prisma.io/docs/ai_button.svg', + 'data-button-text-color': '#71E8DF', + 'data-button-bg-color': '#2D3748', + 'data-button-border': '2px', + 'data-button-border-color': '#71e8df', + 'data-button-border-style': 'solid', + 'data-button-box-shadow': + 'drop-shadow(0px 0.724px 1.251px rgba(14, 18, 28, 0.02)) drop-shadow(0px 1.608px 2.909px rgba(14, 18, 28, 0.04)) drop-shadow(0px 2.793px 5.225px rgba(14, 18, 28, 0.06)) drop-shadow(0px 4.55px 8.671px rgba(14, 18, 28, 0.07)) drop-shadow(0px 7.485px 14.285px rgba(14, 18, 28, 0.08)) drop-shadow(0px 13.358px 24.966px rgba(14, 18, 28, 0.09)) drop-shadow(0px 33px 54px rgba(14, 18, 28, 0.07))', + }, + // OneTrust Cookies Consent Notice start for prisma.io + { + src: 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js', + 'data-document-language': 'true', + 'data-domain-script': '22c2e2c0-3df0-4958-8672-1194370ee230', + }, + ], presets: [ [ 'classic', From ac6e62f4bbf5c29c2f6e11e8a1213fcea72a083c Mon Sep 17 00:00:00 2001 From: Jon Harrell <4829245+jharrell@users.noreply.github.com> Date: Fri, 1 Mar 2024 08:58:59 -0600 Subject: [PATCH 6/6] actual gtag tracking id --- docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 95aa10edbc..aaad72ce0a 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -57,7 +57,7 @@ const config: Config = { 'classic', { gtag: { - trackingID: 'G-999X9XX9XX', + trackingID: 'G-YS7QHR40SL', anonymizeIP: true, }, },