Merge pull request #2 from aljazceru/claude/add-plausible-analytics-011CUrCGDoXbc9b3qxcDWxHu

Add Plausible Analytics support
This commit is contained in:
2025-11-06 13:17:33 +01:00
committed by GitHub
3 changed files with 9 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,4 @@
{% if site.plausible %}
<!-- Plausible Analytics -->
<script defer data-domain="{{ site.plausible }}" src="{% if site.plausible_script_url %}{{ site.plausible_script_url }}{% else %}https://plausible.io/js/script.js{% endif %}"></script>
{% endif %}

View File

@@ -6,6 +6,9 @@
<!-- Setup Google Analytics -->
{% include head-custom-google-analytics.html %}
<!-- Setup Plausible Analytics -->
{% include head-custom-plausible-analytics.html %}
<!-- You can set your favicon here -->
<!-- link rel="shortcut icon" type="image/x-icon" href="{{ '/favicon.ico' | relative_url }}" -->