File tree Expand file tree Collapse file tree 5 files changed +22
-8
lines changed Expand file tree Collapse file tree 5 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,5 @@ maxAge = -1
2525 github_repo = " https://github.com/nginxinc/nginx-hugo-theme"
2626 github_subdir = " exampleSite"
2727 enable_last_modified = true
28+ enable_coveo = true
2829 coveo_search_redirect = " /search.html"
Original file line number Diff line number Diff line change 4040
4141{{/* 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') */}}
4242< meta http-equiv ="Content-Security-Policy " content ="script-src 'self' 'unsafe-inline'
43- https://consent.trustarc.com/ https://mktg.tags.f5.com/basic/prod/utag.sync.js https://static.cloud.coveo.com/ https://*.f5.com/
43+ https://consent.trustarc.com/ https://mktg.tags.f5.com/basic/prod/utag.sync.js {{ if .Site.Params.enable_coveo }} https://static.cloud.coveo.com/ {{ end }} https://*.f5.com/
4444 https://*.netlify.app https://gist.github.com
4545 https://tag.demandbase.com/pscSDsz4.min.js
4646 https://munchkin.brightfunnel.com/js/build/bf-munchkin.min.js
Original file line number Diff line number Diff line change 1717{{ end }}
1818
1919<!-- Coveo Atomic -->
20+ {{ if .Site.Params.enable_coveo }}
2021< script
2122 type ="module "
2223 src ="https://static.cloud.coveo.com/atomic/v3.19.0/atomic.esm.js "
4041{{ $secureCoveo := $.Scratch.Get "coveoSc" | minify | fingerprint "sha512" }}
4142
4243
43- < script src ="{{ $secureCoveo.RelPermalink }} " integrity ="{{ $secureCoveo.Data.Integrity }} "
44- type ="text/javascript "> </ script >
45-
46-
44+ < script src ="{{ $secureCoveo.RelPermalink }} " integrity ="{{ $secureCoveo.Data.Integrity }} "type ="text/javascript "> </ script >
45+ {{ end }}
4746
4847<!-- Load the Redoc resources if we're not using Dev Portal for the API reference layout-->
4948{{ if not ( eq .Site.Params.useDevPortal true ) }}
Original file line number Diff line number Diff line change 66
77{{ $cssHighlight := resources.Get "css/v2/highlight.css" | minify | fingerprint "sha512"}}
88< link href ="{{ $cssHighlight.RelPermalink }} " rel ="stylesheet " type ="text/css ">
9+
910<!-- load CSS Atomic CSS -->
11+ {{ if .Site.Params.enable_coveo }}
1012< link
1113 rel ="stylesheet "
1214 href ="https://static.cloud.coveo.com/atomic/v3.19.0/themes/coveo.css "
1315 integrity ="sha512-m2BufPi8Tc6H2jcQfDj/PIl5H57C9jeqhbDFgFXKTtOhoC4S7ULXmx74FseZ8WXpfdT9uyccMHDBJDrIZlrUUQ== "
1416 crossorigin ="anonymous "/>
17+ {{ end }}
Original file line number Diff line number Diff line change 11{{ define "main" }}
2- < section class ="search no-sidebar ">
3- {{ partial "coveo-atomic.html" .}}
4- </ section >
2+ {{ if .Site.Params.enable_coveo }}
3+ < section class ="search no-sidebar ">
4+ {{ partial "coveo-atomic.html" .}}
5+ </ section >
6+ {{ else }}
7+ < div class ="content " data-testid ="content ">
8+ < div class ="not-found-container " data-testid ="not-found-container ">
9+ < h1 class ="info-header ">
10+ Search functionality is disabled.
11+ </ h1 >
12+ < a href ="{{ .Site.BaseURL | relLangURL }} " aria-label ="Return home "> Return to the {{ .Site.Title }} homepage.</ a >
13+ </ div >
14+ </ div >
15+ {{ end }}
516{{ end }}
You can’t perform that action at this time.
0 commit comments