mirror of
https://github.com/docker/docs.git
synced 2026-10-23 18:09:02 +03:00
Drops the staging-only VWO Async SmartCode snippet from the head partial and the matching analytics.vwo account param. VWO is no longer used; this was left over from the 2024 A/B testing trial on docs-stage. Signed-off-by: maxcleme <maxime.clement@docker.com>
91 lines
3.3 KiB
HTML
91 lines
3.3 KiB
HTML
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
{{ partial "meta.html" . }}
|
|
{{- range .AlternativeOutputFormats -}}
|
|
{{- if eq .Name "markdown" -}}
|
|
<link
|
|
rel="{{ .Rel }}"
|
|
type="{{ .MediaType.Type }}"
|
|
href="{{ partial "utils/markdown-url.html" $ }}"
|
|
/>
|
|
{{- else -}}
|
|
<link
|
|
rel="{{ .Rel }}"
|
|
type="{{ .MediaType.Type }}"
|
|
href="{{ .Permalink }}"
|
|
/>
|
|
{{- end -}}
|
|
{{ end -}}
|
|
{{ partial "utils/css.html" . }}
|
|
<link href="/pagefind/pagefind-component-ui.css" rel="stylesheet" />
|
|
{{- if hugo.IsProduction -}}
|
|
<script
|
|
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
|
|
type="text/javascript"
|
|
charset="UTF-8"
|
|
data-domain-script="{{ site.Params.analytics.onetrust }}"
|
|
></script>
|
|
<script type="text/javascript">
|
|
function OptanonWrapper() {}
|
|
</script>
|
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
})(window,document,'script','dataLayer','{{ site.Params.analytics.google }}');</script> <script>
|
|
(function(h,o,t,j,a,r){
|
|
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
|
h._hjSettings={hjid:{{ site.Params.analytics.hotjar.prod | safeJS }},hjsv:6};
|
|
a=o.getElementsByTagName('head')[0];
|
|
r=o.createElement('script');r.async=1;
|
|
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
|
|
a.appendChild(r);
|
|
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
|
|
</script>
|
|
{{- else if (eq hugo.Environment "staging") -}}
|
|
<script>
|
|
(function(h,o,t,j,a,r){
|
|
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
|
h._hjSettings={hjid:{{ site.Params.analytics.hotjar.stage | safeJS }},hjsv:6};
|
|
a=o.getElementsByTagName('head')[0];
|
|
r=o.createElement('script');r.async=1;
|
|
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
|
|
a.appendChild(r);
|
|
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
|
|
</script>
|
|
{{ end }}
|
|
{{- with site.Params.analytics.marlin -}}
|
|
{{- $apiKey := "" -}}
|
|
{{- $endpoint := "" -}}
|
|
{{- $env := "" -}}
|
|
{{- if hugo.IsProduction -}}
|
|
{{- $apiKey = .apiKey.prod -}}
|
|
{{- $endpoint = .endpoint.prod -}}
|
|
{{- $env = "prod" -}}
|
|
{{- else if eq hugo.Environment "staging" -}}
|
|
{{- $apiKey = .apiKey.stage -}}
|
|
{{- $endpoint = .endpoint.stage -}}
|
|
{{- $env = "staging" -}}
|
|
{{- end -}}
|
|
{{- if and $apiKey $endpoint -}}
|
|
<script>
|
|
window.__marlinConfig = {{ dict "apiKey" $apiKey "endpoint" $endpoint "environment" $env | jsonify | safeJS }};
|
|
</script>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{/* preload Roboto Flex as it's a critical font: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload */}}
|
|
<link
|
|
href="/assets/fonts/RobotoFlex.woff2"
|
|
rel="preload"
|
|
as="font"
|
|
type="font/woff2"
|
|
crossorigin
|
|
/>
|
|
{{ $theme := resources.Get "js/theme.js" | js.Build (dict "minify" true) }}
|
|
<script>{{ $theme.Content | safeJS }}</script>
|
|
{{ $js := resources.Match "js/src/**.js"
|
|
| resources.Concat "scripts.js"
|
|
| js.Build (dict "minify" true "targetPath" "scripts.js")
|
|
}}
|
|
<script defer src="{{ $js.Permalink }}"></script>
|