File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2254,6 +2254,11 @@ func (repo *Repository) relAvatarLink(e Engine) string {
2254
2254
return setting .AppSubURL + "/repo-avatars/" + repo .Avatar
2255
2255
}
2256
2256
2257
+ // AvatarLink returns a link to the repository's avatar.
2258
+ func (repo * Repository ) AvatarLink () string {
2259
+ return repo .avatarLink (x )
2260
+ }
2261
+
2257
2262
// avatarLink returns user avatar absolute link.
2258
2263
func (repo * Repository ) avatarLink (e Engine ) string {
2259
2264
link := repo .relAvatarLink (e )
Original file line number Diff line number Diff line change 97
97
{{end}}
98
98
{{end}}
99
99
<meta property="og:type" content="object" />
100
- <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
100
+ {{if .Repository.AvatarLink}}
101
+ <meta property="og:image" content="{{.Repository.AvatarLink}}" />
102
+ {{else}}
103
+ <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
104
+ {{end}}
101
105
{{else}}
102
106
<meta property="og:title" content="{{AppName}}">
103
107
<meta property="og:type" content="website" />
You can’t perform that action at this time.
0 commit comments