Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Render ¶
type Render struct {
PatternLibraryAssetsPath, SiteDomain string
// contains filtered or unexported fields
}
func New ¶
New returns a render struct and accepts any rendering client that satisfies the Renderer interface
func NewWithDefaultClient ¶
func NewWithDefaultClient(assetFn func(name string) ([]byte, error), assetNameFn func() []string, assetsPath, siteDomain string) *Render
NewWithDefaultClient returns a render struct with a default rendering client provided (default: unrolled/render) When the siteDomain argument contains "localhost", then the rendering client will be instantiated in "development" mode. This means that templates are recompiled on request. Any updates made to your templates can then be viewed upon browser refresh, rather than having to restart the app.
func (*Render) BuildErrorPage ¶
BuildErrorPage resolves the rendering of a specific page with a given model and template name
func (*Render) BuildPage ¶
BuildPage resolves the rendering of a specific page with a given model and template name
func (*Render) NewBasePageModel ¶
NewBasePageModel wraps around the model package's NewPage function, but injects the assets path and site domain from the render struct. This is to negate the need for the caller to have to provide these values for every new page created in a frontend service