diff options
author | 6543 <6543@obermui.de> | 2020-08-24 21:46:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-24 22:46:56 +0300 |
commit | 4b97f9018b51c1ef56c16154931123aac6080445 (patch) | |
tree | 2c25e4cbeb137a9bb747a38a68176de86da4f11c /templates | |
parent | 63f3c42be99cd72e765f7d8abfb8b2500b487855 (diff) | |
download | gitea-4b97f9018b51c1ef56c16154931123aac6080445.tar.gz gitea-4b97f9018b51c1ef56c16154931123aac6080445.zip |
OpenGraph: use repo avatar if exist (#12586)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/head.tmpl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 8c14ccfb6d..5f27779235 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -97,7 +97,11 @@ {{end}} {{end}} <meta property="og:type" content="object" /> - <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" /> + {{if .Repository.AvatarLink}} + <meta property="og:image" content="{{.Repository.AvatarLink}}" /> + {{else}} + <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" /> + {{end}} {{else}} <meta property="og:title" content="{{AppName}}"> <meta property="og:type" content="website" /> |