From 92f830ebea028e5157034647dfbb4638f5c6a63e Mon Sep 17 00:00:00 2001 From: Arindam200 Date: Tue, 17 Mar 2026 03:58:39 +0530 Subject: [PATCH] fix: top navbar issue --- docs/my-website/docusaurus.config.js | 32 +++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/docs/my-website/docusaurus.config.js b/docs/my-website/docusaurus.config.js index 1b46ed107d..ec3ba19188 100644 --- a/docs/my-website/docusaurus.config.js +++ b/docs/my-website/docusaurus.config.js @@ -195,6 +195,20 @@ const config = { }; }, }), + // Ensure gtag exists before the GA script loads. + () => ({ + name: 'gtag-shim', + injectHtmlTags() { + return { + headTags: [ + { + tagName: 'script', + innerHTML: `window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}if(!window.gtag){window.gtag=gtag;}`, + }, + ], + }; + }, + }), ], presets: [ @@ -202,10 +216,13 @@ const config = { 'classic', /** @type {import('@docusaurus/preset-classic').Options} */ ({ - gtag: { - trackingID: 'G-K7K215ZVNC', - anonymizeIP: true, - }, + gtag: + process.env.NODE_ENV === 'production' + ? { + trackingID: 'G-K7K215ZVNC', + anonymizeIP: true, + } + : undefined, docs: { sidebarPath: require.resolve('./sidebars.js'), }, @@ -245,6 +262,12 @@ const config = { position: 'left', label: 'Docs', }, + { + type: 'docSidebar', + sidebarId: 'learnSidebar', + position: 'left', + label: 'Learn', + }, { type: 'docSidebar', sidebarId: 'integrationsSidebar', @@ -256,7 +279,6 @@ const config = { label: 'Enterprise', to: "docs/enterprise" }, - { to: '/release_notes', label: 'Release Notes', position: 'left' }, { to: '/blog', label: 'Blog', position: 'left' }, { href: 'https://github.com/BerriAI/litellm',