From 6367693f9bcfd6767c815ca6e398665e8fbe836b Mon Sep 17 00:00:00 2001 From: Brady Fomegne Date: Mon, 12 Oct 2026 08:47:09 +0100 Subject: [PATCH] chore: config microsoft clarity for analytics --- config/production/hugo.yaml | 5 ++++- layouts/partials/head/custom-head.html | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/config/production/hugo.yaml b/config/production/hugo.yaml index f1bac38..456894c 100644 --- a/config/production/hugo.yaml +++ b/config/production/hugo.yaml @@ -1,7 +1,10 @@ ######################## production configuration #################### # The base URL of your site (required). This will be prepended to all relative URLs. baseURL: https://fodydev.org -# googleAnalytics: +# googleAnalytics: enableRobotsTXT: true build: writeStats: true + +params: + clarity_id: "ywgigdjola" diff --git a/layouts/partials/head/custom-head.html b/layouts/partials/head/custom-head.html index 46d5bbf..d558786 100644 --- a/layouts/partials/head/custom-head.html +++ b/layouts/partials/head/custom-head.html @@ -2,12 +2,22 @@ {{- $target := "css/home.css" }} {{ $options := (dict "targetPath" $target) }} {{ if eq hugo.Environment "production" }} - {{ $options = merge $options (dict "outputStyle" "compressed" "enableSourceMap" false) }} +{{ $options = merge $options (dict "outputStyle" "compressed" "enableSourceMap" false) }} {{ else }} - {{ $options = merge $options (dict "outputStyle" "nested" "enableSourceMap" true) }} +{{ $options = merge $options (dict "outputStyle" "nested" "enableSourceMap" true) }} {{ end }} {{ $style := resources.Get $source | toCSS $options | postCSS (dict "config" "postcss.config.js") | resources.Fingerprint "sha512" }} {{ if (eq .Kind "home") }} {{ end }} + +{{ with site.Params.clarity_id -}} + +{{- end }}