Skip to content

Commit c54d7e9

Browse files
committed
Qualtrics: Change hugo param usage
1 parent 6751320 commit c54d7e9

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

exampleSite/hugo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ maxAge = -1
2626
github_subdir = "exampleSite"
2727
enable_last_modified = true
2828
disable_coveo = true
29+
disable_qualtrics = true
2930
coveo_search_redirect = "/search.html"

layouts/_default/single.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ <h1>{{ .Title }}</h1>
3838
{{ end }}
3939

4040
{{ partial "version-list" . }}
41-
{{ if .Site.Params.enable_qualtrics }}
41+
{{ $qualtricsEnabled := partial "get-feature-flags.html" (dict "featureName" "disable_qualtrics") }}
42+
{{ if $qualtricsEnabled }}
4243
{{ partial "qualtrics-feedback.html" }}
4344
{{ end }}
4445
</article>

layouts/partials/meta.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
{{ end }}
3939

4040
{{ $coveoEnabled := partial "get-feature-flags.html" (dict "featureName" "disable_coveo" "Site" .Site) }}
41-
{{ $qualtricsDisabled := partial "get-feature-flags.html" (dict "featureName" "disable_qualtrics") }}
41+
{{ $qualtricsEnabled := partial "get-feature-flags.html" (dict "featureName" "disable_qualtrics") }}
4242
{{/* set custom CSP to load styles and scripts with special handling for GTM scripts (requires unsafe-inline) and Dev Portal page(s) (requires 'unsafe-eval') */}}
4343
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'
4444
https://consent.trustarc.com/
4545
https://mktg.tags.f5.com/basic/prod/utag.sync.js
46-
{{ if $coveoEnabled }} https://static.cloud.coveo.com/ {{ end }}
46+
{{ if $coveoEnabled }}https://static.cloud.coveo.com/{{ end }}
4747
https://*.f5.com/
4848
https://*.netlify.app https://gist.github.com
4949
https://tag.demandbase.com/pscSDsz4.min.js
@@ -56,8 +56,8 @@
5656
https://cdn.bizible.com/xdc.js
5757
https://f5networksglobalprod.122.2o7.net/
5858
https://f5networksnginxdocs.122.2o7.net/
59-
{{ if $qualtricsDisabled }} https://*.siteintercept.qualtrics.com/SIE/?Q_ZID=* {{ end }}
60-
{{ if $qualtricsDisabled }} https://siteintercept.qualtrics.com/ {{ end }}
59+
{{ if $qualtricsEnabled }}https://*.siteintercept.qualtrics.com/SIE/?Q_ZID=*{{ end }}
60+
{{ if $qualtricsEnabled }}https://siteintercept.qualtrics.com/ {{ end }}
6161
{{ if in .Params.doctypes "devportal" }} 'unsafe-eval' {{end}};
6262
worker-src 'self' blob:">
6363
{{/* end */}}

0 commit comments

Comments
 (0)