fixed 自定义配置一言头像
This commit is contained in:
1 parent
c3e9e6170b
commit
9687256c7d
3 files changed
+5
-2
No files matched your search
@@ -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 = ""
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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: '#'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<script>
|
||||
window.barrageConfig = {
|
||||
enableHitokoto: {{ .Site.Params.barrage.enableHitokoto | default false }},
|
||||
hitokotoUrl: "{{ .Site.Params.barrage.hitokotoUrl | default "https://v1.hitokoto.cn" }}"
|
||||
hitokotoUrl: "{{ .Site.Params.barrage.hitokotoUrl | default "https://v1.hitokoto.cn" }}",
|
||||
hitokotoAvatar: "{{ .Site.Params.barrage.hitokotoAvatar | default .Site.Params.author.avatar }}"
|
||||
};
|
||||
</script>
|
||||
<div class="barrager"></div>
|
||||
|
||||
Reference in new issue
Block a user