mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-05 19:08:32 +02:00
Suppress OneTrust cookie banner on local hugo server (#2331)
* Suppress OneTrust cookie banner on hugo server Gate the OneTrust loader on hugo.IsProduction so the consent banner no longer renders during local development. Netlify production and deploy-preview builds set HUGO_ENV=production (or default to it), so the banner still loads in every deployed context. Mirrors the gating pattern already used by the Segment loader immediately below. * Gate OneTrust on hugo.IsServer instead of hugo.IsProduction The previous gate used hugo.IsProduction, which is also false on Netlify deploy previews (HUGO_ENV=staging) and would suppress the banner there. Switch to (not hugo.IsServer) so the banner is suppressed only during local hugo server runs and renders on every hugo build target — production, deploy-preview, and branch builds alike.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- OneTrust Cookies Consent Notice start for local.qdrant.tech -->
|
<!-- OneTrust Cookies Consent Notice start for local.qdrant.tech -->
|
||||||
{{ if .Site.Params.onetrustScriptID }}
|
{{ if and (not hugo.IsServer) .Site.Params.onetrustScriptID }}
|
||||||
<script
|
<script
|
||||||
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
|
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
|
||||||
type="text/javascript"
|
type="text/javascript"
|
||||||
|
|||||||
Reference in New Issue
Block a user