Skip to content

Commit

Permalink
Add file name and branch to page title (#4902)
Browse files Browse the repository at this point in the history
  • Loading branch information
adelowo authored and techknowlogick committed Sep 10, 2018
1 parent e47df0b commit 8ee9922
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions routers/repo/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 8ee9922

Please sign in to comment.