diff options
Diffstat (limited to 'modules/templates/static.go')
-rw-r--r-- | modules/templates/static.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/templates/static.go b/modules/templates/static.go index 6fd4d245e1..e69e1cae48 100644 --- a/modules/templates/static.go +++ b/modules/templates/static.go @@ -129,6 +129,15 @@ func JSONRenderer() macaron.Handler { }) } +// JSRenderer implements the macaron handler for serving JS templates. +func JSRenderer() macaron.Handler { + return macaron.Renderer(macaron.RenderOptions{ + Funcs: NewFuncMap(), + TemplateFileSystem: NewTemplateFileSystem(), + HTMLContentType: "application/javascript", + }) +} + // Mailer provides the templates required for sending notification mails. func Mailer() *template.Template { for _, funcs := range NewFuncMap() { |