diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html new file mode 100644 index 0000000..133e13c --- /dev/null +++ b/layouts/partials/analytics.html @@ -0,0 +1,25 @@ +{{ if hugo.IsProduction }} + {{ with .Site.Params.fathomAnalytics.site }} + + {{ end }} + {{ with site.Params.plausibleAnalytics.domain }} + + {{ end }} + {{ with site.Params.umamiAnalytics }} + {{- $region := "eu" }} + {{- if isset . "region" }} + {{- $region = .region }} + {{- end }} + + {{ end }} + {{ template "_internal/google_analytics.html" . }} +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 02c2240..c31f2b0 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,5 +1,42 @@ {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} +{{/* Metadata */}} + + {{ with union .Site.Params.keywords .Params.keywords -}} + + {{- end }} + {{ with .Site.Params.robots }} + + {{ end }} + {{ with .Params.robots }} + + {{ end }} + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .RelPermalink ($.Site.Title | emojify) | safeHTML }} + {{ end -}} + {{/* Icons */}} + {{ if templates.Exists "partials/favicons.html" }} + {{ partialCached "favicons.html" .Site }} + {{ else }} + + + + + {{ end }} {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} +{{/* Analytics */}} + {{ partial "analytics.html" . }}