mirror of
https://github.com/gogs/gogs.git
synced 2026-05-06 22:46:49 +02:00
Show file name in browser tab title when viewing files (#5896)
This commit is contained in:
committed by
GitHub
parent
ed6109d35d
commit
f70f29fdb0
@@ -125,6 +125,7 @@ func renderFile(c *context.Context, entry *git.TreeEntry, treeLink, rawLink stri
|
||||
return
|
||||
}
|
||||
|
||||
c.Data["Title"] = blob.Name() + " - " + c.Data["Title"].(string)
|
||||
c.Data["FileSize"] = blob.Size()
|
||||
c.Data["FileName"] = blob.Name()
|
||||
c.Data["HighlightClass"] = highlight.FileNameToHighlightClass(blob.Name())
|
||||
|
||||
Reference in New Issue
Block a user