From add68b29b671f3438b330345f610e80cf3c9f967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Wed, 23 Sep 2026 00:02:09 +0200 Subject: [PATCH] Restore the promo top banner on docs and preview (#3136) --- .changeset/restore-promo-top-banner.md | 6 ++++++ docs/layouts/DocsLayout.astro | 4 ++++ shared/layouts/BaseLayout.astro | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 .changeset/restore-promo-top-banner.md diff --git a/.changeset/restore-promo-top-banner.md b/.changeset/restore-promo-top-banner.md new file mode 100644 index 000000000..62550caba --- /dev/null +++ b/.changeset/restore-promo-top-banner.md @@ -0,0 +1,6 @@ +--- +"@tabler/docs": patch +"@tabler/preview": patch +--- + +Fixed the missing promo top banner on docs.tabler.io and preview.tabler.io by restoring the `banner.js` script. diff --git a/docs/layouts/DocsLayout.astro b/docs/layouts/DocsLayout.astro index 9ebbcee28..320b8cb1e 100644 --- a/docs/layouts/DocsLayout.astro +++ b/docs/layouts/DocsLayout.astro @@ -86,6 +86,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; // Strip /docs prefix (and optional .html) for the docs namespace URL. // Canonical form has no trailing slash (matching vercel.json trailingSlash: false); @@ -510,5 +512,7 @@ const relatedPages = await Promise.all( + + {isVercelDeploy && + + {isVercelDeploy &&