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