Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page is the overall page content to render.
func New ¶
New returns a new page. If it is supplied no arguments, the page is blank and loaded with the default configured layout. If it is supplied a single string argument, it loads the page content with the supplied file found in the defaultTemplateDir directory. If it is supplied two strings, the first file is loaded as the layout and the second is loaded as the page content.
func (*Page) LoadData ¶
func (p *Page) LoadData(data interface{})
LoadData loads the supplied data to be rendered as mustache variables in the page on Write.
func (*Page) LoadLayout ¶
LoadLayout loads the supplied layout, found in defaultTemplateDir, as the page layout.
Click to show internal directories.
Click to hide internal directories.