chore: use with

This commit is contained in:
Fernandez Ludovic
2025-09-03 02:54:39 +02:00
parent 9b73081788
commit 1d86e6fa0f
3 changed files with 2 additions and 9 deletions

View File

@@ -7,12 +7,12 @@
{{- end }} {{- end }}
<!-- Umami --> <!-- Umami -->
{{- if .Site.Params.analytics.umami -}} {{- with .Site.Params.analytics.umami -}}
{{ partial "components/analytics/umami.html" . }} {{ partial "components/analytics/umami.html" . }}
{{- end }} {{- end }}
<!-- Matomo --> <!-- Matomo -->
{{- if .Site.Params.analytics.matomo -}} {{- with .Site.Params.analytics.matomo -}}
{{ partial "components/analytics/matomo.html" . }} {{ partial "components/analytics/matomo.html" . }}
{{- end }} {{- end }}

View File

@@ -3,8 +3,6 @@ Matomo Analytics.
https://developer.matomo.org/guides/tracking-javascript-guide https://developer.matomo.org/guides/tracking-javascript-guide
*/ -}} */ -}}
{{- with .Site.Params.analytics.matomo -}}
{{- if not .serverURL }} {{- if not .serverURL }}
{{- errorf "Missing Matomo 'serverURL' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#matomo-analytics" -}} {{- errorf "Missing Matomo 'serverURL' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#matomo-analytics" -}}
{{- end -}} {{- end -}}
@@ -27,5 +25,3 @@ https://developer.matomo.org/guides/tracking-javascript-guide
})(); })();
</script> </script>
<!-- End Matomo Code --> <!-- End Matomo Code -->
{{- end -}}

View File

@@ -3,8 +3,6 @@ Umami Analytics
https://umami.is/docs/tracker-configuration https://umami.is/docs/tracker-configuration
*/ -}} */ -}}
{{- with .Site.Params.analytics.umami -}}
{{- if not .serverURL }} {{- if not .serverURL }}
{{- errorf "Missing Umami 'serverURL' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#umami-analytics" -}} {{- errorf "Missing Umami 'serverURL' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#umami-analytics" -}}
{{- end -}} {{- end -}}
@@ -54,4 +52,3 @@ https://umami.is/docs/tracker-configuration
{{- end -}} {{- end -}}
<script async defer {{ range $k, $v := ($attributes.Get "umami" ) }} {{ (printf `%s=%q` $k $v) | safeHTMLAttr }}{{- end -}}></script> <script async defer {{ range $k, $v := ($attributes.Get "umami" ) }} {{ (printf `%s=%q` $k $v) | safeHTMLAttr }}{{- end -}}></script>
{{- end -}}