mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-18 02:00:01 +02:00
Rewrite OpenGraph Header
This commit is contained in:
parent
e28bd3c4d6
commit
e99bf7f16d
9 changed files with 49 additions and 59 deletions
|
@ -634,6 +634,10 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
|
|||
}
|
||||
|
||||
cardWidth, cardHeight := card.DefaultSize()
|
||||
ctx.Data["OpenGraphTitle"] = repo.Name
|
||||
ctx.Data["OpenGraphURL"] = repo.HTMLURL()
|
||||
ctx.Data["OpenGraphType"] = "object"
|
||||
ctx.Data["OpenGraphDescription"] = repo.Description
|
||||
ctx.Data["OpenGraphImageURL"] = repo.SummaryCardURL()
|
||||
ctx.Data["OpenGraphImageWidth"] = cardWidth
|
||||
ctx.Data["OpenGraphImageHeight"] = cardHeight
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue