From 99deb4bd1c115b5b11f3632ca57ccc4d41fb3ee9 Mon Sep 17 00:00:00 2001
From: Eltrac
Date: Sun, 28 Sep 2025 11:34:33 +0800
Subject: remove: umami web analytics integration
Stopped tracking visitors because I realized that:
1. It's no necessary for personal blogs to analyze user behaviors,
2. Checking pageviews on a daily basis really messed up my mental health.
---
assets/js/settings.js | 6 ------
layouts/_partials/head.html | 1 -
layouts/_partials/head/umami.html | 11 -----------
layouts/_partials/header/language-switch.html | 1 -
layouts/_partials/header/navigation.html | 1 -
layouts/_partials/home/home-nav-item.html | 3 +--
layouts/_partials/home/home-nav.html | 3 +--
layouts/_partials/home/latest-posts.html | 3 +--
layouts/_partials/items/post-small.html | 2 +-
layouts/_partials/items/post.html | 5 +----
layouts/_partials/posts/action-menu/info-links.html | 4 ++--
layouts/_partials/posts/now-read-this.html | 2 +-
layouts/_partials/scripts/action-menu-js.html | 4 ----
layouts/_partials/scripts/aplayer-js.html | 3 ---
static/_headers | 1 -
static/graph.html | 2 --
16 files changed, 8 insertions(+), 44 deletions(-)
delete mode 100644 layouts/_partials/head/umami.html
diff --git a/assets/js/settings.js b/assets/js/settings.js
index ecc027d2..6dcbdfa9 100644
--- a/assets/js/settings.js
+++ b/assets/js/settings.js
@@ -32,12 +32,6 @@
// initialize checkbox options
function initCheckboxes() {
const checkboxOptions = [
- {
- id: 'dontAllowTracking',
- label: '禁止网站使用 Web 分析工具跟踪用户行为',
- storage: 'umami.disabled',
- default: 'false'
- },
{
id: 'hideBatrick',
label: '隐藏 Batrick(返回顶部按钮)',
diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html
index 10cd1c0d..f2e4b8f3 100644
--- a/layouts/_partials/head.html
+++ b/layouts/_partials/head.html
@@ -4,5 +4,4 @@
{{ hugo.Generator }}
{{ partial "head/siteinfo" . }}
{{ partial "head/css" . }}
- {{ partial "head/umami" . }}
diff --git a/layouts/_partials/head/umami.html b/layouts/_partials/head/umami.html
deleted file mode 100644
index 881b34c6..00000000
--- a/layouts/_partials/head/umami.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
diff --git a/layouts/_partials/header/language-switch.html b/layouts/_partials/header/language-switch.html
index 51a9c7b7..9f0a9c20 100644
--- a/layouts/_partials/header/language-switch.html
+++ b/layouts/_partials/header/language-switch.html
@@ -7,7 +7,6 @@
{{- $entry := index $switch $lang -}}
{{ .name }}
{{ end }}
diff --git a/layouts/_partials/home/home-nav-item.html b/layouts/_partials/home/home-nav-item.html
index cffe62ba..639e9762 100644
--- a/layouts/_partials/home/home-nav-item.html
+++ b/layouts/_partials/home/home-nav-item.html
@@ -3,8 +3,7 @@
{{ $text := .text }}
-
+ {{ if eq "/stats/" $.Page.RelPermalink }} opacity-100 font-bolder{{ end }}">