Skip to content

Commit

Permalink
Fix custom templates being ignored (#4638)
Browse files Browse the repository at this point in the history
  • Loading branch information
0rzech authored and lafriks committed Aug 8, 2018
1 parent 00bd627 commit 152c6af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/templates/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,19 @@ 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(),
})
}

// JSONRenderer implements the macaron handler for serving JSON templates.
func JSONRenderer() macaron.Handler {
return macaron.Renderer(macaron.RenderOptions{
Funcs: NewFuncMap(),
TemplateFileSystem: tplFileSys,
TemplateFileSystem: NewTemplateFileSystem(),
HTMLContentType: "application/json",
})
}
Expand Down

0 comments on commit 152c6af

Please sign in to comment.