github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/genny/newapp/web/templates/actions/render.go.tmpl (about)

     1  package actions
     2  
     3  import (
     4    "github.com/gobuffalo/packr/v2"
     5    "github.com/gobuffalo/buffalo/render"
     6  )
     7  
     8  var r *render.Engine
     9  var assetsBox = packr.New("app:assets", "../public")
    10  
    11  func init() {
    12    r = render.New(render.Options{
    13        // HTML layout to be used for all HTML requests:
    14        HTMLLayout:     "application.plush.html",
    15  
    16        // Box containing all of the templates:
    17        TemplatesBox: packr.New("app:templates", "../templates"),
    18        AssetsBox:    assetsBox,
    19  
    20        // Add template helpers here:
    21        Helpers: render.Helpers{
    22          // for non-bootstrap form helpers uncomment the lines
    23          // below and import "github.com/gobuffalo/helpers/forms"
    24          // forms.FormKey:     forms.Form,
    25          // forms.FormForKey:  forms.FormFor,
    26        },
    27    })
    28  }