Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TemplatesDir holds the location of the templates TemplatesDir = "templates/" // Layout is the file name of the layout file Layout = "layout" // Ext is the file extension of the rendered templates Ext = ".html" // Debug enables debug mode Debug = false )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Render ¶
type Render struct { Templates map[string]*template.Template Files map[string][]string TemplatesDir string Layout string Ext string Debug bool }
Render implements gin's HTMLRender and provides some sugar on top of it
func (*Render) AddFromFiles ¶
AddFromFiles parses the files and returns the result
func (*Render) Create ¶
Create goes through the `TemplatesDir` creating the template structure for rendering. Returns the Render instance.
Click to show internal directories.
Click to hide internal directories.