@@ -14,7 +14,6 @@ import (
14
14
"path"
15
15
"strings"
16
16
17
- "github.com/go-macaron/bindata"
18
17
"github.com/go-macaron/binding"
19
18
"github.com/go-macaron/cache"
20
19
"github.com/go-macaron/captcha"
@@ -32,7 +31,6 @@ import (
32
31
"github.com/go-gitea/gitea/modules/context"
33
32
"github.com/go-gitea/gitea/modules/log"
34
33
"github.com/go-gitea/gitea/modules/setting"
35
- "github.com/go-gitea/gitea/modules/template"
36
34
"github.com/go-gitea/gitea/public"
37
35
"github.com/go-gitea/gitea/routers"
38
36
"github.com/go-gitea/gitea/routers/admin"
@@ -77,17 +75,10 @@ func newMacaron() *macaron.Macaron {
77
75
if setting .Protocol == setting .FCGI {
78
76
m .SetURLPrefix (setting .AppSubUrl )
79
77
}
80
- m .Use (macaron .Static (
81
- " public" ,
82
- macaron. StaticOptions {
78
+ m .Use (public .Static (
79
+ & public. Options {
80
+ Directory : path . Join ( setting . StaticRootPath , "public" ),
83
81
SkipLogging : setting .DisableRouterLog ,
84
- FileSystem : bindata .Static (bindata.Options {
85
- Asset : public .Asset ,
86
- AssetDir : public .AssetDir ,
87
- AssetInfo : public .AssetInfo ,
88
- AssetNames : public .AssetNames ,
89
- Prefix : "" ,
90
- }),
91
82
},
92
83
))
93
84
m .Use (macaron .Static (
@@ -98,23 +89,23 @@ func newMacaron() *macaron.Macaron {
98
89
},
99
90
))
100
91
101
- templateOptions := bindata.Options {
102
- Asset : templates .Asset ,
103
- AssetDir : templates .AssetDir ,
104
- AssetInfo : templates .AssetInfo ,
105
- AssetNames : templates .AssetNames ,
106
- Prefix : "" ,
107
- }
92
+ m .Use (templates .Renderer (
93
+ & templates.Options {
94
+ Directory : path .Join (setting .StaticRootPath , "templates" ),
95
+ AppendDirectories : []string {path .Join (setting .CustomPath , "templates" )},
96
+ },
97
+ ))
108
98
109
- funcMap := template .NewFuncMap ()
110
- m .Use (macaron .Renderer (macaron.RenderOptions {
111
- AppendDirectories : []string {path .Join (setting .CustomPath , "templates" )},
112
- Funcs : funcMap ,
113
- IndentJSON : macaron .Env != macaron .PROD ,
114
- TemplateFileSystem : bindata .Templates (templateOptions ),
115
- }))
116
- models .InitMailRender (templateOptions ,
117
- path .Join (setting .CustomPath , "templates/mail" ), funcMap )
99
+ // templateOptions := bindata.Options{
100
+ // Asset: templates.Asset,
101
+ // AssetDir: templates.AssetDir,
102
+ // AssetInfo: templates.AssetInfo,
103
+ // AssetNames: templates.AssetNames,
104
+ // Prefix: "",
105
+ // }
106
+
107
+ // models.InitMailRender(templateOptions,
108
+ // path.Join(setting.CustomPath, "templates/mail"), funcMap)
118
109
119
110
localeNames , err := conf .AssetDir ("locale" )
120
111
if err != nil {
0 commit comments