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