Restore the promo top banner on docs and preview (main) (#3137)

This commit is contained in:
Paweł Kuna authored and GitHub committed 2026-09-23 00:01:55 +02:00
1 parent 084d2021d3
commit c482b48cc0
3 files changed
+15

No files matched your search

+4
View File
@@ -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(
<!-- END GLOBAL MANDATORY SCRIPTS -->
<PageScripts />
{isVercelDeploy && <script is:inline src="https://scripts.tabler.io/banner.js" defer data-tblr-ref="tabler-docs" />}
</body>
</html>