From ec6f05539e90cd9895b11943f05ea1e2035fb6a8 Mon Sep 17 00:00:00 2001 From: Vaica <94612053+zqlit@users.noreply.github.com> Date: Fri, 30 Jan 2026 19:52:13 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=20=E8=87=AA=E5=AE=9A=E4=B9=89=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=80=E8=A8=80=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hugo.toml | 2 ++ themes/Ying/assets/js/barrage.js | 2 +- themes/Ying/layouts/partials/barrage.html | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hugo.toml b/hugo.toml index 467c001e..758d800c 100644 --- a/hugo.toml +++ b/hugo.toml @@ -129,6 +129,8 @@ hasCJKLanguage = true enable = true enableHitokoto = true hitokotoUrl = "https://v1.hitokoto.cn?c=a&c=b&c=c&c=d&c=i" + # 一言弹幕头像,留空则默认使用博客头像 + hitokotoAvatar = "" diff --git a/themes/Ying/assets/js/barrage.js b/themes/Ying/assets/js/barrage.js index dae35b9e..f6173c1b 100644 --- a/themes/Ying/assets/js/barrage.js +++ b/themes/Ying/assets/js/barrage.js @@ -396,7 +396,7 @@ barrageList.push({ id: h.id, text: `${h.content}`, - avatar: 'https://cravatar.cn/avatar/default?d=mp', + avatar: config.hitokotoAvatar || 'https://cravatar.cn/avatar/default?d=mp', url: '#' }); } diff --git a/themes/Ying/layouts/partials/barrage.html b/themes/Ying/layouts/partials/barrage.html index 17c02fc4..907273c2 100644 --- a/themes/Ying/layouts/partials/barrage.html +++ b/themes/Ying/layouts/partials/barrage.html @@ -2,7 +2,8 @@