github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/render/options.go (about)

     1  package render
     2  
     3  import (
     4  	"github.com/gobuffalo/helpers/hctx"
     5  	"github.com/gobuffalo/packd"
     6  )
     7  
     8  // Helpers to be included in all templates
     9  type Helpers hctx.Map
    10  
    11  // Options for render.Engine
    12  type Options struct {
    13  	// HTMLLayout is the default layout to be used with all HTML renders.
    14  	HTMLLayout string
    15  
    16  	// JavaScriptLayout is the default layout to be used with all JavaScript renders.
    17  	JavaScriptLayout string
    18  
    19  	// TemplatesBox is the location of the templates directory on disk.
    20  	TemplatesBox packd.Box
    21  
    22  	// AssetsBox is the location of the public assets the app will serve.
    23  	AssetsBox packd.Box
    24  
    25  	// Helpers to be rendered with the templates
    26  	Helpers Helpers
    27  
    28  	// TemplateEngine to be used for rendering HTML templates
    29  	TemplateEngines map[string]TemplateEngine
    30  
    31  	// DefaultContentType instructs the engine what it should fall back to if
    32  	// the "content-type" is unknown
    33  	DefaultContentType string
    34  }