From aa9b49b3180ed6f538659b689001083b9dead242 Mon Sep 17 00:00:00 2001 From: "David G. Simmons" Date: Mon, 21 Oct 2024 09:11:26 -0400 Subject: [PATCH] Add statcounter to statistics (#1003) --- exampleSite/hugo.yaml | 10 +++++++--- layouts/_default/baseof.html | 2 +- layouts/partials/analytics.html | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 8eae71535..f4d3921ff 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -93,7 +93,7 @@ params: # Enable dark theme darkMode: - + # [Deprecated] Enable dark theme # This is a deprecated setting, but has not been removed to maintain backward compatibility # If `theme` is set, the `darkMode` setting will be discarded. @@ -192,7 +192,11 @@ params: # scheme: https # instance: umami.example.com # id: - + # # Statcounter + # statcounter: + # project: 1234567890 + # invisible: 1 + # security: deadbeef # Enable Support support: enable: false @@ -287,7 +291,7 @@ params: plyr: # options doc: https://github.com/sampotts/plyr#options # fullscreen: true - + # Enables copy code button copyCodeButton: enable: true diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e9c21955f..dc1850a3b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ {{ template "_internal/twitter_cards.html" . }} {{ block "header" . }} {{ end }} - + {{- partial "analytics.html" . -}} {{end}} + + {{ with .statcounter }} + + + + + + {{ end }} {{ end }} {{ end }} {{ end }}