support custom analytics

This commit is contained in:
Reorx 2022-05-19 16:15:32 +08:00
parent ecaf84c7c7
commit 5c968f59a2
1 changed files with 6 additions and 1 deletions

View File

@ -72,8 +72,13 @@
{{- /* Misc */}}
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
{{- if site.GoogleAnalytics }}
{{- template "_internal/google_analytics.html" . }}
{{- end -}}
{{- if site.Params.useCustomAnalytics }}
{{- partialCached "custom_analytics.html" . "custom_analytics.html" }}
{{- end -}}
{{- end -}}
{{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started */}}
{{- if .Params.cover.image }}