From aee1573ff3598c71c9245255cf3545ab8c2f770b Mon Sep 17 00:00:00 2001 From: goodroot <9484709+goodroot@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:47:06 -0800 Subject: [PATCH] boolean env var for preview context --- docusaurus.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index efa54ade..d19b4af6 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -5,6 +5,8 @@ import dotenv from "dotenv" const ssrTemplate = require("./src/internals/ssr.template") const customFields = require("./src/config/customFields") const path = require("path") +const isPreviews = process.env.NETLIFY && process.env.IS_PREVIEW === 'true' + dotenv.config() @@ -12,7 +14,7 @@ const config = { title: "QuestDB", tagline: "QuestDB is the fastest open source time series database", url: `https://${customFields.domain}`, - baseUrl: "/docs/", + baseUrl: isPreviews ? '/' : '/docs/', baseUrlIssueBanner: false, favicon: "/images/favicon.webp", organizationName: "QuestDB",