From ed41f049a7a636fa0e67d0d977e44b85b107eac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Tue, 29 Sep 2026 20:35:08 +0200 Subject: [PATCH] Show the promo top banner only on production deploys (#3239) --- .changeset/top-banner-production-only.md | 6 ++++++ docs/layouts/DocsLayout.astro | 6 +++--- shared/layouts/BaseLayout.astro | 8 ++++---- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .changeset/top-banner-production-only.md diff --git a/.changeset/top-banner-production-only.md b/.changeset/top-banner-production-only.md new file mode 100644 index 000000000..09ed2b984 --- /dev/null +++ b/.changeset/top-banner-production-only.md @@ -0,0 +1,6 @@ +--- +"@tabler/preview": patch +"@tabler/docs": patch +--- + +Updated the promo top banner to load only on production deploys, not on branch previews. diff --git a/docs/layouts/DocsLayout.astro b/docs/layouts/DocsLayout.astro index 431138936..01f980278 100644 --- a/docs/layouts/DocsLayout.astro +++ b/docs/layouts/DocsLayout.astro @@ -94,8 +94,8 @@ const pagePlugins = [...basePlugins, ...cssPlugins.filter((plugin) => !basePlugi const environment = process.env.NODE_ENV || 'production'; // Vercel preview/branch deployments must not be indexed (VERCEL_ENV is unset locally). const isVercelPreview = !!process.env.VERCEL_ENV && process.env.VERCEL_ENV !== 'production'; -// The promo top banner loads on Vercel deploys (production and branch previews), never in local builds. -const isVercelDeploy = !!process.env.VERCEL_ENV; +// The promo top banner loads on Vercel production deploys only, never on branch previews or local builds. +const isProduction = process.env.VERCEL_ENV === 'production'; // Strip /docs prefix (and optional .html) for the docs namespace URL. // Canonical form has no trailing slash (matching vercel.json trailingSlash: false); @@ -525,6 +525,6 @@ const relatedPages = await Promise.all( - {isVercelDeploy && - {isVercelDeploy &&