新增自定义匿名头像服务提供者,用于扩展评论组件的第三方头像能力。#219
Open
atangccc wants to merge 1 commit into
Open
Conversation
…provider,且Dicebear头像插件对于大部分用户网络不是很友好,不太稳定,无法灵活配置这类匿名头像服务。新增自定义匿名头像服务提供者,用于解决当前评论组件仅支持 Gravatar 的限制。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
部分站点希望匿名评论使用自定义头像服务,例如随机头像接口或站点自建头像服务,同时保留已登录用户的真实头像。当前插件只有 Gravatar provider,且Dicebear头像插件对于大部分用户网络不是很友好,不太
稳定,无法灵活配置这类匿名头像服务。新增自定义匿名头像服务提供者,用于解决当前评论组件仅支持 Gravatar 的限制。
具体实现
custom头像 provider。{hash}/{seed}占位符。_avatar={hash}参数,便于头像服务按匿名用户稳定生成头像。anonymousUser,即仅匿名评论使用第三方头像服务,不影响已登录用户真实头像。