mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add file name and branch to page title (#4902)
This commit is contained in:
		
				
					committed by
					
						
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							e47df0b301
						
					
				
				
					commit
					8ee9922fe6
				
			@@ -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())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user