Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnjinError ¶
func NewEnjinError ¶
func NewEnjinError(title, summary, content string) *EnjinError
func (*EnjinError) Html ¶
func (e *EnjinError) Html() (html template.HTML)
func (*EnjinError) NjnData ¶
func (e *EnjinError) NjnData() (data map[string]interface{})
type Format ¶
type Format interface {
This() interface{}
Name() (name string)
Label() (label string)
Extensions() (extensions []string)
Prepare(ctx context.Context, content string) (out context.Context, err error)
Process(ctx context.Context, t Theme, content string) (html template.HTML, redirect string, err *EnjinError)
IndexDocument(pg interface{}) (doc interface{}, err error)
NewDocumentMapping(tag language.Tag) (doctype, analyzer string, dm *mapping.DocumentMapping)
}
type FormatProvider ¶
type Theme ¶
type Theme interface {
// FS returns the theme filesystem
FS() fs.FileSystem
// GetParentTheme returns a parent Theme instance
GetParentTheme() (parent Theme)
// GetBlockThemeNames returns a list of names of BlockThemes from theme.toml
GetBlockThemeNames() (names []string)
// NewTextTemplateWithContext constructs a new text/template with the given context
NewTextTemplateWithContext(name string, ctx context.Context) (tmpl *textTemplate.Template, err error)
// NewTextFuncMapWithContext constructs a new text/template.FuncMap with the given context
NewTextFuncMapWithContext(ctx context.Context) (fm textTemplate.FuncMap)
// RenderTextTemplateContent renders the given text/template content with the given context
RenderTextTemplateContent(ctx context.Context, tmplContent string) (rendered string, err error)
// NewHtmlTemplateWithContext constructs a new text/template with the given context
NewHtmlTemplateWithContext(name string, ctx context.Context) (tmpl *htmlTemplate.Template, err error)
// NewHtmlFuncMapWithContext constructs a new text/template.FuncMap with the given context
NewHtmlFuncMapWithContext(ctx context.Context) (fm htmlTemplate.FuncMap)
// RenderHtmlTemplateContent renders the given text/template content with the given context
RenderHtmlTemplateContent(ctx context.Context, tmplContent string) (rendered string, err error)
}
Click to show internal directories.
Click to hide internal directories.