Skip to content

怎么使用非Gravatar头像? #261

Answered by Lruihao
Ailontania asked this question in Q&A
Discussion options

You must be logged in to vote

在 v0.2.18 版本,该功能发生变化,详见 #288 ,所以对于该问题,v0.2.18 版本之后的回答如下:

  1. profile 的头像由 params.home.profilegravatarEmailavatarURL 的值决定,优先级:gravatarEmail > avatarURL

        [params.home.profile]
          enable = true
          gravatarEmail = ""
          avatarURL = "/images/avatar.jpg"

    使用本地头像,params.gravatar.enable = falsegravatarEmail 为空,并设置 avatarURL 即可

  2. 文章的头像仅由作者的邮箱(author.email)和头像(author.avatar)决定

    • 当文章作者名和站点作者名一致时,文章作者配置 > 站点作者配置,缺省值为站点作者配置
    • 当文章未配置作者,视为同上
    • 当文章作者名和站点作者名不一致时,文章作者配置 > 站点作者配置,缺省值为空

    使用本地头像,params.gravatar.enable = false 或 作者邮箱(author.email)为空,并设置作者头像(author.avatar)即可

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Ailontania
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Lruihao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Q&A question and answer
2 participants
Converted from issue

This discussion was converted from issue #260 on January 04, 2023 13:04.