@@ -43,11 +43,35 @@ <h2 class="single-subtitle">{{ . }}</h2>
4343 {{- /* Meta */ -}}
4444 < div class ="post-meta ">
4545 < div class ="post-meta-line ">
46- {{- $author := $params .author | default .Site.Author.name | default (T "author") -}}
47- {{- $authorLink := $params .authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
46+ {{- $author := .Params .author | default .Site.Author.name | default (T "author") -}}
47+ {{- $authorLink := .Params .authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
4848 < span class ="post-author ">
49- {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fa-solid fa-user-circle fa-fw") "Content" $author -}}
50- {{- partial "plugin/link.html" $options -}}
49+ {{- $avatar := "" -}}
50+ {{- with .Params.gravatarEmail -}}
51+ {{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%v?s=240&d=mp" -}}
52+ {{- else -}}
53+ {{- with .Params.avatarURL -}}
54+ {{- $avatar = . | relURL -}}
55+ {{- else -}}
56+ {{- with .Site.Params.home.profile.gravatarEmail -}}
57+ {{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%v?s=240&d=mp" -}}
58+ {{- else -}}
59+ {{- with .Site.Params.home.profile.avatarURL -}}
60+ {{- $avatar = . | relURL -}}
61+ {{- end -}}
62+ {{- end -}}
63+ {{- end -}}
64+ {{- end -}}
65+
66+ {{- if $avatar -}}
67+ < a href ="{{ $authorLink }} " title ="Author " rel ="author " class ="author ">
68+ {{- dict "Src" $avatar "Class" "avatar" | partial "plugin/image.html" -}}
69+ < span class ="post-author-name "> {{ $author }}</ span >
70+ </ a >
71+ {{- else -}}
72+ {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fa-solid fa-user-circle fa-fw") "Content" $author -}}
73+ {{- partial "plugin/link.html" $options -}}
74+ {{- end -}}
5175 </ span >
5276
5377 {{- $categories := slice -}}
0 commit comments