fix(head): only load analytics when IsProduction

This commit is contained in:
ZhenShuo Leo
2025-10-01 13:48:43 +08:00
parent 374a0f51f7
commit 8b41f89455

View File

@@ -186,7 +186,9 @@
{{ partial "schema.html" . }}
{{/* Analytics */}}
{{ partial "analytics/main.html" .Site }}
{{ if hugo.IsProduction }}
{{ partial "analytics/main.html" . }}
{{ end }}
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
{{ if templates.Exists "partials/extend-head.html" }}