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 &&