mirror of
https://github.com/gogs/gogs.git
synced 2026-02-01 20:19:23 +01:00
Show file name in browser tab title when viewing files (#5896)
This commit is contained in:
committed by
GitHub
parent
ed6109d35d
commit
f70f29fdb0
@@ -6,6 +6,7 @@ All notable changes to Gogs are documented in this file.
|
||||
|
||||
### Added
|
||||
|
||||
- Show file name in browser tab title when viewing files. [#5896](https://github.com/gogs/gogs/pull/5896)
|
||||
- Support using TLS for Redis session provider using `[session] PROVIDER_CONFIG = ...,tls=true`. [#7860](https://github.com/gogs/gogs/pull/7860)
|
||||
- Support expanading values in `app.ini` from environment variables, e.g. `[database] PASSWORD = ${DATABASE_PASSWORD}`. [#8057](https://github.com/gogs/gogs/pull/8057)
|
||||
- Support custom logout URL that users get redirected to after sign out using `[auth] CUSTOM_LOGOUT_URL`. [#8089](https://github.com/gogs/gogs/pull/8089)
|
||||
|
||||
@@ -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