diff options
author | Piotr Orzechowski <piotr@orzechowski.tech> | 2018-08-08 13:15:48 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-08-08 14:15:48 +0300 |
commit | 152c6af97e34199789b3afd49f3ab967c6c85823 (patch) | |
tree | 2cc41e65d878cb60495de0b8e3edc87dbb5008a0 /modules/templates/static.go | |
parent | 00bd6277a87da706946badfb4d1cd90fe2a362f9 (diff) | |
download | gitea-152c6af97e34199789b3afd49f3ab967c6c85823.tar.gz gitea-152c6af97e34199789b3afd49f3ab967c6c85823.zip |
Fix custom templates being ignored (#4638)
Diffstat (limited to 'modules/templates/static.go')
-rw-r--r-- | modules/templates/static.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/templates/static.go b/modules/templates/static.go index c16b18cc08..6fd4d245e1 100644 --- a/modules/templates/static.go +++ b/modules/templates/static.go @@ -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", }) } |