forked from gomods/athens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
render.go
37 lines (30 loc) · 922 Bytes
/
render.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package actions
import (
"github.com/gobuffalo/buffalo/render"
"github.com/gobuffalo/packr"
)
var registry *render.Engine
var proxy *render.Engine
var assetsBox = packr.NewBox("../public")
func init() {
registry = render.New(render.Options{
// HTML layout to be used for all HTML requests:
HTMLLayout: "application.html",
JavaScriptLayout: "application.js",
// Box containing all of the templates:
TemplatesBox: packr.NewBox("../templates/registry"),
AssetsBox: assetsBox,
// Add template helpers here:
Helpers: render.Helpers{},
})
proxy = render.New(render.Options{
// HTML layout to be used for all HTML requests:
HTMLLayout: "application.html",
JavaScriptLayout: "application.js",
// Box containing all of the templates:
TemplatesBox: packr.NewBox("../templates/proxy"),
AssetsBox: assetsBox,
// Add template helpers here:
Helpers: render.Helpers{},
})
}