mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-23 09:30:50 +00:00
Rewrite OpenGraph Header
This commit is contained in:
parent
e28bd3c4d6
commit
e99bf7f16d
9 changed files with 49 additions and 59 deletions
|
@ -63,6 +63,12 @@ func userProfile(ctx *context.Context) {
|
|||
ctx.Data["Title"] = ctx.ContextUser.DisplayName()
|
||||
ctx.Data["PageIsUserProfile"] = true
|
||||
|
||||
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
|
||||
|
||||
// prepare heatmap data
|
||||
if setting.Service.EnableUserHeatmap {
|
||||
data, err := activities_model.GetUserHeatmapDataByUser(ctx, ctx.ContextUser, ctx.Doer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue