From 5a3fba86ed414e32430184fbc46ca1849487158d Mon Sep 17 00:00:00 2001 From: Dominic Reich Date: Mon, 27 Nov 2023 23:02:30 +0100 Subject: [PATCH] plausible update (replace hardcode with hugo module) --- config/_default/module.toml | 4 ++++ config/_default/params.toml | 10 ++++++++++ layouts/partials/extend-head.html | 4 +--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/config/_default/module.toml b/config/_default/module.toml index 1111605..492050b 100644 --- a/config/_default/module.toml +++ b/config/_default/module.toml @@ -1,6 +1,10 @@ [[imports]] path = "github.com/jpanther/congo/v2" +[[imports]] + path = "github.com/divinerites/plausible-hugo" + [hugoVersion] extended = true min = "0.87.0" + diff --git a/config/_default/params.toml b/config/_default/params.toml index ce0acde..4c47c0b 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -5,6 +5,7 @@ # Refer to the theme docs for more details about each of these parameters. # https://jpanther.github.io/congo/docs/configuration/#theme-parameters +theme = [ "congo", "plausible-hugo"] # congo (default), avocado, cherry, fire, ocean, sapphire and slate. # colorScheme = "congo" @@ -87,6 +88,15 @@ rssFullContent = false domain = "cdn-eu.usefathom.com" # domain = "network.oe7drt.com" +[plausible] + enable = true # Whether to enable plausible tracking + domain = "oe7drt.com" # Plausible "domain" name/id in your dashboard + selfhosted_domain = "oe7drt.com" # Self-hosted plausible domain + outbound_link = true + file_downloads = true + #file_downloads_types = "sh,run" + gitstar = false + # [plausibleAnalytics] # domain = "oe7drt.com" # event = "" diff --git a/layouts/partials/extend-head.html b/layouts/partials/extend-head.html index 87721dd..54333ca 100644 --- a/layouts/partials/extend-head.html +++ b/layouts/partials/extend-head.html @@ -1,4 +1,2 @@ -{{ if hugo.IsProduction }} - -{{ end }} +{{ partial "plausible_head.html" . }}