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