Skip to content

Commit 8ee9922

Browse files
adelowotechknowlogick
authored andcommitted
Add file name and branch to page title (#4902)
1 parent e47df0b commit 8ee9922

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

routers/repo/view.go

+2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
152152
}
153153
defer dataRc.Close()
154154

155+
ctx.Data["Title"] = ctx.Data["Title"].(string) + " - " + ctx.Repo.TreePath + " at " + ctx.Repo.BranchName
156+
155157
ctx.Data["FileSize"] = blob.Size()
156158
ctx.Data["FileName"] = blob.Name()
157159
ctx.Data["HighlightClass"] = highlight.FileNameToHighlightClass(blob.Name())

0 commit comments

Comments
 (0)