Files
docker-docs/layouts/partials/head.html
David Karlsson a0d21ade2f migrate to hugo
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-22 09:41:02 +02:00

64 lines
2.8 KiB
HTML

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{{ partial "meta.html" . }}
{{- 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 }}
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap" />
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:FILL@1" rel="stylesheet" />
{{ partial "utils/css.html" . }}
{{ $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
"params" (dict
"apikey" site.Params.algolia.apikey
"appid" site.Params.algolia.appid
"indexname" site.Params.algolia.indexname
)
"targetPath" "scripts.js"
)
}}
<script defer src="{{ $js.Permalink }}"></script>
<link rel="preconnect" href="https://{{ site.Params.algolia.appid }}-dsn.algolia.net" crossorigin />
{{ if .Page.Store.Get "hasMermaid" }}
{{ $mermaid := resources.Get "js/mermaid.js" | js.Build (dict "minify" true) }}
<script>{{ $mermaid.Content | safeJS }}</script>
{{ end }}