diff --git a/settings.yaml b/settings.yaml
index 989ebb8..797b041 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -88,12 +88,6 @@ spec:
value: true
- label: 隐藏
value: false
- - $formkit: text
- label: 头像服务镜像地址
- help: '用于替换头像服务镜像地址,无须输入结尾的"/"。'
- name: providerMirror
- value: "https://cravatar.cn"
- validation: required
- group: basic_style
label: '基础样式'
formSchema:
@@ -922,6 +916,12 @@ spec:
label: 侧边栏最近评论-展示评论数量
placeholder: 请输入数量数值
value: 5
+ - $formkit: text
+ label: 侧边栏最近评论-邮箱头像服务地址
+ help: '邮箱头像服务地址,支持参考文档自定义部分参数,其中“{hash}”表示邮箱Hash值。'
+ name: providerMirror
+ value: "https://cravatar.cn/avatar/{hash}"
+ validation: required
- $formkit: radio
name: categories_more
label: 侧边栏分类-显示”更多”按钮
diff --git a/templates/widget/recent_comments.html b/templates/widget/recent_comments.html
index 15d8294..92f476c 100644
--- a/templates/widget/recent_comments.html
+++ b/templates/widget/recent_comments.html
@@ -13,7 +13,7 @@
th:with="
emailHash = ${comment.spec.owner.annotations != null ? comment.spec.owner.annotations['email-hash'] : ''},
userA = ${comment.owner.avatar},
- img = ${#strings.isEmpty(userA) && !#strings.isEmpty(emailHash) ? theme.config.basic_info.providerMirror+'/avatar/'+emailHash : userA}">
+ img = ${#strings.isEmpty(userA) && !#strings.isEmpty(emailHash) ? #strings.replace(theme.config.sidebar.providerMirror, '{hash}', emailHash) : userA}">