diff --git a/models/user.go b/models/user.go index c7ceacaa6b7b..0e1710de7e1e 100644 --- a/models/user.go +++ b/models/user.go @@ -252,6 +252,11 @@ func (u *User) HomeLink() string { return setting.AppSubURL + "/" + u.Name } +// HTMLURL returns the user or organization's full link. +func (u *User) HTMLURL() string { + return setting.AppURL + u.Name +} + // GenerateEmailActivateCode generates an activate code based on user information and given e-mail. func (u *User) GenerateEmailActivateCode(email string) string { code := base.CreateTimeLimitCode( diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 18805953b44d..f4b883335ec2 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -46,6 +46,30 @@ {{end}} + + +{{if .PageIsUserProfile}} + + + + + +{{else if .Repository}} + + + + + {{if .Repository.Description}} + + {{end}} + +{{else}} + + + + + +{{end}}