From 241dcdcb10a38318d043e8e052358bb78842e626 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Nov 2025 06:55:43 +0000 Subject: [PATCH] Add Plausible Analytics support - Add plausible configuration option in _config.yml - Create head-custom-plausible-analytics.html include file - Update head-custom.html to include Plausible Analytics - Support for self-hosted Plausible via plausible_script_url option Users can now configure Plausible Analytics similarly to Google Analytics: - Set plausible: yourdomain.com in _config.yml - Optionally set plausible_script_url for self-hosted instances --- _config.yml | 2 ++ _includes/head-custom-plausible-analytics.html | 4 ++++ _includes/head-custom.html | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 _includes/head-custom-plausible-analytics.html diff --git a/_config.yml b/_config.yml index c5cf3fd..5d46d35 100644 --- a/_config.yml +++ b/_config.yml @@ -2,4 +2,6 @@ title: Hacker theme description: Hacker is a theme for GitHub Pages. show_downloads: true google_analytics: +plausible: +# plausible_script_url: https://plausible.io/js/script.js # Optional: for self-hosted Plausible instances theme: jekyll-theme-hacker \ No newline at end of file diff --git a/_includes/head-custom-plausible-analytics.html b/_includes/head-custom-plausible-analytics.html new file mode 100644 index 0000000..f172aed --- /dev/null +++ b/_includes/head-custom-plausible-analytics.html @@ -0,0 +1,4 @@ +{% if site.plausible %} + + +{% endif %} diff --git a/_includes/head-custom.html b/_includes/head-custom.html index 44cdb83..cc6b4cd 100644 --- a/_includes/head-custom.html +++ b/_includes/head-custom.html @@ -6,6 +6,9 @@ {% include head-custom-google-analytics.html %} + +{% include head-custom-plausible-analytics.html %} +