diff options
Diffstat (limited to 'routers/web/repo/view.go')
-rw-r--r-- | routers/web/repo/view.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index fd8c1da058..9030b03a90 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -394,6 +394,10 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry) { ctx.Data["FileName"] = blob.Name() ctx.Data["RawFileLink"] = ctx.Repo.RepoLink + "/raw/" + ctx.Repo.BranchNameSubURL() + "/" + util.PathEscapeSegments(ctx.Repo.TreePath) + ctx.Data["OpenGraphTitle"] = ctx.Data["Title"] + ctx.Data["OpenGraphURL"] = fmt.Sprintf("%s%s", setting.AppURL, ctx.Data["Link"]) + ctx.Data["OpenGraphNoDescription"] = true + if entry.IsLink() { _, link, err := entry.FollowLinks() // Errors should be allowed, because this shouldn't |