Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeuboTemplateRenderer ¶
type BeuboTemplateRenderer struct { T *template.Template PluginHandler *plugin.Handler ReloadTemplates bool CurrentTheme string ThemeDir string DB *gorm.DB }
BeuboTemplateRenderer holds all the configuration variables for rendering templates in Beubo
func (*BeuboTemplateRenderer) GetPageTemplates ¶
func (btr *BeuboTemplateRenderer) GetPageTemplates() map[string]string
GetPageTemplates recursively parses the themes directory to find all theme files
func (*BeuboTemplateRenderer) GetThemes ¶
func (btr *BeuboTemplateRenderer) GetThemes() map[string]string
GetThemes fetches all the themes in the theme directory as strings
func (*BeuboTemplateRenderer) Init ¶
func (btr *BeuboTemplateRenderer) Init()
Init prepares the BeuboTemplateRenderer to render pages with html templates
func (*BeuboTemplateRenderer) RenderHTMLPage ¶
func (btr *BeuboTemplateRenderer) RenderHTMLPage(w http.ResponseWriter, r *http.Request, pageData structs.PageData)
RenderHTMLPage handles rendering of the html template and should be the last function called before returning the response
Click to show internal directories.
Click to hide internal directories.