mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Fix custom templates being ignored (#4638)
This commit is contained in:
		
				
					committed by
					
						
						Lauris BH
					
				
			
			
				
	
			
			
			
						parent
						
							00bd6277a8
						
					
				
				
					commit
					152c6af97e
				
			@@ -112,13 +112,11 @@ func NewTemplateFileSystem() templateFileSystem {
 | 
			
		||||
	return fs
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var tplFileSys = NewTemplateFileSystem()
 | 
			
		||||
 | 
			
		||||
// HTMLRenderer implements the macaron handler for serving HTML templates.
 | 
			
		||||
func HTMLRenderer() macaron.Handler {
 | 
			
		||||
	return macaron.Renderer(macaron.RenderOptions{
 | 
			
		||||
		Funcs:              NewFuncMap(),
 | 
			
		||||
		TemplateFileSystem: tplFileSys,
 | 
			
		||||
		TemplateFileSystem: NewTemplateFileSystem(),
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -126,7 +124,7 @@ func HTMLRenderer() macaron.Handler {
 | 
			
		||||
func JSONRenderer() macaron.Handler {
 | 
			
		||||
	return macaron.Renderer(macaron.RenderOptions{
 | 
			
		||||
		Funcs:              NewFuncMap(),
 | 
			
		||||
		TemplateFileSystem: tplFileSys,
 | 
			
		||||
		TemplateFileSystem: NewTemplateFileSystem(),
 | 
			
		||||
		HTMLContentType:    "application/json",
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user