mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 04:09:29 +02:00
Rewrite OpenGraph Header
This commit is contained in:
parent
e28bd3c4d6
commit
e99bf7f16d
9 changed files with 49 additions and 59 deletions
|
@ -47,6 +47,12 @@ func Home(ctx *context.Context) {
|
|||
ctx.Data["PageIsUserProfile"] = true
|
||||
ctx.Data["Title"] = org.DisplayName()
|
||||
|
||||
ctx.Data["OpenGraphTitle"] = ctx.ContextUser.DisplayName()
|
||||
ctx.Data["OpenGraphType"] = "profile"
|
||||
ctx.Data["OpenGraphImageURL"] = ctx.ContextUser.AvatarLink(ctx)
|
||||
ctx.Data["OpenGraphURL"] = ctx.ContextUser.HTMLURL()
|
||||
ctx.Data["OpenGraphDescription"] = ctx.ContextUser.Description
|
||||
|
||||
var orderBy db.SearchOrderBy
|
||||
sortOrder := ctx.FormString("sort")
|
||||
if _, ok := repo_model.OrderByFlatMap[sortOrder]; !ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue