From c482b48cc0689d83f668a2af5117f70961f1d1f1 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:01:55 +0200 Subject: [PATCH] Restore the promo top banner on docs and preview (main) (#3137) --- .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 5df2496cd..c8b54a22a 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); @@ -549,5 +551,7 @@ const relatedPages = await Promise.all( + + {isVercelDeploy && + + {isVercelDeploy &&