Browse Source

Add file name and branch to page title (#4902)

master
Lanre Adelowo techknowlogick 6 years ago
parent
commit
8ee9922fe6
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      routers/repo/view.go

+ 2
- 0
routers/repo/view.go View File

@@ -152,6 +152,8 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
}
defer dataRc.Close()

ctx.Data["Title"] = ctx.Data["Title"].(string) + " - " + ctx.Repo.TreePath + " at " + ctx.Repo.BranchName

ctx.Data["FileSize"] = blob.Size()
ctx.Data["FileName"] = blob.Name()
ctx.Data["HighlightClass"] = highlight.FileNameToHighlightClass(blob.Name())


Loading…
Cancel
Save