website/layouts/partials/head.html
liuboaibc a7fe711b1f fix canonical tag url error
Signed-off-by: liuboaibc <kukudehero@gmail.com>
2021-04-21 16:43:57 +08:00

79 lines
3.8 KiB
HTML

<meta charset="utf-8">
<title>{{ with .Params.Title }}{{ . }}{{ else }}{{ with .Site.Params.title }}{{ . }}{{ end }}{{ end }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
<meta name="keywords" content="{{ with .Params.Keywords }}{{ range $i, $e := . }}{{ if $i }} {{ end }}{{ $e }}{{ end }}{{ else }}{{ with .Site.Params.keywords }}{{ . }}{{ end }}{{ end }}">
<meta property="og:type" content="article"/>
<meta property="og:title" content="{{ with .Params.Title }}{{ . }}{{ else }}{{ with .Site.Params.title }}{{ . }}{{ end }}{{ end }}"/>
<meta property="og:description" content="{{ with .Params.Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"/>
<meta property="og:image" content="{{ with .Params.snapshot }}{{ . }}{{ else }}{{ with .Site.Params.snapshot }}{{ . | absURL }}{{ end }}{{ end }}"/>
<meta property="og:url" content="{{ .Permalink }}"/>
<meta name="docsearch:language" content="{{ .Site.LanguageCode }}" />
<link rel="canonical" href="https://kubesphere.io{{ .RelPermalink }}" />
{{- partial "css.html" . -}}
<script src='{{ "js/jquery-3.5.0.min.js" | relURL }}'></script>
<script src='{{ "js/viewer.min.js" | relURL }}'></script>
<script src='{{ "js/jquery.modal.min.js" | relURL }}'></script>
{{ if .IsDescendant (.GetPage "/docs") }}
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
{{ end }}
<!-- Global site tag (gtag.js) - Google Analytics -->
{{ if .Site.Params.addGoogleAnalytics }}
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-181950513-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-181950513-1');
</script>
{{ end }}
{{ if .Site.Params.addGoogleTag }}
<!-- Google Tag Manager -->
<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','GTM-W9FLX4R');</script>
<!-- End Google Tag Manager -->
<script type="text/javascript" src="//script.crazyegg.com/pages/scripts/0100/4419.js" async="async"></script>
{{ end }}
<!-- GrowingIO Analytics code version 2.1 -->
<!-- Copyright 2015-2017 GrowingIO, Inc. More info available at http://www.growingio.com -->
<script type='text/javascript'>
!function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.giocdn.com/2.1/gio.js","gio");
gio('init', '8a24ae300cbf8b8c', {});
//custom page code begin here
//custom page code end here
gio('send');
</script>
<!-- End GrowingIO Analytics code version: 2.1 -->
<!-- Hotjar Tracking Code for https://kubesphere.io/docs/ -->
{{ if (and (.Site.Params.hotjarTracking) (.IsDescendant (.GetPage "/docs")) (eq .Site.Language.Lang "en")) }}
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:1756364,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 }}