mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
feat: add support for baidu_tongji and baidu_site_verification
The new options can be added under `marketing` in `params.toml`
This commit is contained in:
1 parent
a9a74e160d
commit
69de00c0cd
2 files changed
+17
No files matched your search
@@ -0,0 +1,13 @@
|
||||
{{ $baidu_tongji := site.Params.marketing.baidu_tongji | default "" }}
|
||||
|
||||
{{ if hugo.IsProduction | and $baidu_tongji }}
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?{{ $baidu_tongji }}";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
{{ end }}
|
||||
@@ -15,6 +15,9 @@
|
||||
{{ with site.Params.marketing.google_site_verification }}
|
||||
<meta name="google-site-verification" content="{{ . }}" />
|
||||
{{- end -}}
|
||||
{{ with site.Params.marketing.baidu_site_verification }}
|
||||
<meta name="baidu-site-verification" content="{{ . }}" />
|
||||
{{- end -}}
|
||||
|
||||
{{ $scr := .Scratch }}
|
||||
|
||||
@@ -182,6 +185,7 @@
|
||||
{{ partial "marketing/google_analytics" . }}
|
||||
{{ partial "marketing/google_tag_manager" . }}
|
||||
{{ partial "marketing/microsoft_clarity" . }}
|
||||
{{ partial "marketing/baidu_tongji" . }}
|
||||
|
||||
{{/* Netlify Identity integration. */}}
|
||||
{{ $use_cms := templates.Exists "wowchemycms/single.wowchemycms_config.yml" | default (site.Params.cms.netlify_cms | default false) }}
|
||||
|
||||
Reference in new issue
Block a user