mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
Restore the promo top banner on docs and preview (main) (#3137)
This commit is contained in:
1 parent
084d2021d3
commit
c482b48cc0
3 files changed
+15
No files matched your search
@@ -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>
|
||||
Reference in new issue
Block a user