Rewrite OpenGraph Header
This commit is contained in:
parent
e28bd3c4d6
commit
e99bf7f16d
9 changed files with 49 additions and 59 deletions
|
@ -419,6 +419,10 @@ func Diff(ctx *context.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
ctx.Data["OpenGraphTitle"] = commit.Summary() + " · " + base.ShortSha(commitID)
|
||||
ctx.Data["OpenGraphURL"] = fmt.Sprintf("%s/commit/%s", ctx.Repo.Repository.HTMLURL(), commitID)
|
||||
_, ctx.Data["OpenGraphDescription"], _ = strings.Cut(commit.Message(), "\n")
|
||||
|
||||
ctx.HTML(http.StatusOK, tplCommitPage)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue