mirror of https://github.com/lxndrblz/anatole.git

copilot-swe-agent[bot]
4 days ago 32dbb9c716d46c000e8ba55ce4e43ca812241622
fix: guard footer scripts with Scratch to prevent double-tracking
1 files modified
3 ■■■■■ changed files
layouts/partials/footer.html 3 ●●●●● patch | view | raw | blame | history
layouts/partials/footer.html
@@ -41,6 +41,8 @@
    {{ end }}
  </ul>
</footer>
{{- if not (.context.Scratch.Get "footerScriptsRendered") -}}
  {{- .context.Scratch.Set "footerScriptsRendered" true -}}
{{- partial "medium-zoom.html" .context -}}
{{- if (hasPrefix .context.Site.Config.Services.GoogleAnalytics.ID "G-") -}}
  {{- template "_internal/google_analytics.html" .context -}}
@@ -48,3 +50,4 @@
{{- if and (hugo.IsProduction) (.context.Site.Params.gtagId) -}}
  {{ partial "google-analytics-gtag-async.html" .context }}
{{- end -}}
{{- end -}}