github.com/mayra-cabrera/buffalo@v0.9.4-0.20170814145312-66d2e7772f11/generators/newapp/templates/actions/render.go.tmpl (about) 1 package actions 2 3 import ( 4 "github.com/gobuffalo/packr" 5 "github.com/gobuffalo/buffalo/render" 6 ) 7 8 var r *render.Engine 9 10 func init() { 11 r = render.New(render.Options{ 12 {{ if .asWeb -}} 13 // HTML layout to be used for all HTML requests: 14 HTMLLayout: "application.html", 15 16 // Box containing all of the templates: 17 TemplatesBox: packr.NewBox("../templates"), 18 19 // Add template helpers here: 20 Helpers: render.Helpers{}, 21 {{ end -}} 22 }) 23 }