From 804c70f7efb8f5491c24f1c709b06937a4ae0157 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 25 Nov 2023 20:05:20 +0000 Subject: [PATCH] feat: support privacy analytics (fathom, plausible, pirsch) --- .../layouts/partials/marketing/fathom.html | 5 ++++ .../layouts/partials/marketing/index.html | 25 +++++++++++++++++++ .../layouts/partials/marketing/pirsch.html | 5 ++++ .../layouts/partials/marketing/plausible.html | 5 ++++ .../layouts/partials/site_head.html | 14 +---------- 5 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 modules/blox-tailwind/layouts/partials/marketing/fathom.html create mode 100644 modules/blox-tailwind/layouts/partials/marketing/index.html create mode 100644 modules/blox-tailwind/layouts/partials/marketing/pirsch.html create mode 100644 modules/blox-tailwind/layouts/partials/marketing/plausible.html diff --git a/modules/blox-tailwind/layouts/partials/marketing/fathom.html b/modules/blox-tailwind/layouts/partials/marketing/fathom.html new file mode 100644 index 000000000..df0badb52 --- /dev/null +++ b/modules/blox-tailwind/layouts/partials/marketing/fathom.html @@ -0,0 +1,5 @@ +{{ $fathom := site.Params.marketing.analytics.fathom | default "" }} + +{{ if hugo.IsProduction | and $fathom }} + +{{ end }} diff --git a/modules/blox-tailwind/layouts/partials/marketing/index.html b/modules/blox-tailwind/layouts/partials/marketing/index.html new file mode 100644 index 000000000..5940dbf5d --- /dev/null +++ b/modules/blox-tailwind/layouts/partials/marketing/index.html @@ -0,0 +1,25 @@ +{{/* HUGO BLOX: MARKETING MODULE */}} + +{{/* VERIFICATIONS */}} + +{{ with site.Params.marketing.verification.google }} + +{{- end -}} + +{{ with site.Params.marketing.verification.baidu }} + +{{- end -}} + +{{ with site.Params.marketing.verification.bing }} + +{{- end -}} + +{{/* ANALYTICS */}} + +{{ partial "marketing/google_analytics" . }} +{{ partial "marketing/google_tag_manager" . }} +{{ partial "marketing/microsoft_clarity" . }} +{{ partial "marketing/baidu_tongji" . }} +{{ partial "marketing/plausible" . }} +{{ partial "marketing/fathom" . }} +{{ partial "marketing/pirsch" . }} diff --git a/modules/blox-tailwind/layouts/partials/marketing/pirsch.html b/modules/blox-tailwind/layouts/partials/marketing/pirsch.html new file mode 100644 index 000000000..310aa4f27 --- /dev/null +++ b/modules/blox-tailwind/layouts/partials/marketing/pirsch.html @@ -0,0 +1,5 @@ +{{ $pirsch := site.Params.marketing.analytics.pirsch | default "" }} + +{{ if hugo.IsProduction | and $pirsch }} + +{{ end }} diff --git a/modules/blox-tailwind/layouts/partials/marketing/plausible.html b/modules/blox-tailwind/layouts/partials/marketing/plausible.html new file mode 100644 index 000000000..4822f8d00 --- /dev/null +++ b/modules/blox-tailwind/layouts/partials/marketing/plausible.html @@ -0,0 +1,5 @@ +{{ $plausible := site.Params.marketing.analytics.plausible | default "" }} + +{{ if hugo.IsProduction | and $plausible }} + +{{ end }} diff --git a/modules/blox-tailwind/layouts/partials/site_head.html b/modules/blox-tailwind/layouts/partials/site_head.html index 5a4273b12..17f6808a9 100644 --- a/modules/blox-tailwind/layouts/partials/site_head.html +++ b/modules/blox-tailwind/layouts/partials/site_head.html @@ -134,19 +134,7 @@ {{ end }} {{/* Marketing */}} - {{ with site.Params.marketing.verification.google }} - - {{- end -}} - {{ with site.Params.marketing.verification.baidu }} - - {{- end -}} - {{ with site.Params.marketing.verification.bing }} - - {{- end -}} - {{ partial "marketing/google_analytics" . }} - {{ partial "marketing/google_tag_manager" . }} - {{ partial "marketing/microsoft_clarity" . }} - {{ partial "marketing/baidu_tongji" . }} + {{ partial "marketing/index" . }} {{/* RSS Feed */}} {{ with .OutputFormats.Get "RSS" }}