Documentation ¶
Index ¶
- Constants
- type Provider
- func (provider *Provider) GetAliasIndexTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetConversionTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetErrorTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetItemTemplate(itemType, hostname string) (*template.Template, error)
- func (provider *Provider) GetOpenSearchDescriptionTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetRSSTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetRobotsTxtTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetSearchTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetSimpleTemplate(templateName, hostname string) (*template.Template, error)
- func (provider *Provider) GetSitemapEntryTemplate(hostname string) (template *template.Template, childPlaceholder string, err error)
- func (provider *Provider) GetSitemapTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetSnippetTemplate(snippetName, hostname string) (*template.Template, error)
- func (provider *Provider) GetTagMapTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) GetXMLSitemapTemplate(hostname string) (*template.Template, error)
- func (provider *Provider) StoreTemplatesOnDisc() (success bool, err error)
Constants ¶
const (
TemplateFileExtension = ".gohtml"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct { Modified chan bool // contains filtered or unexported fields }
A Provider gives access to all required templates.
func NewProvider ¶
NewProvider creates a new template provider with the given folder as the base.
func (*Provider) GetAliasIndexTemplate ¶
GetAliasIndexTemplate returns the alias-index template.
func (*Provider) GetConversionTemplate ¶
GetConversionTemplate returns the template for conversion.
func (*Provider) GetErrorTemplate ¶
GetErrorTemplate returns the template for error pages.
func (*Provider) GetItemTemplate ¶
GetItemTemplate returns the item template for the given item type (e.g. document, presentation).
func (*Provider) GetOpenSearchDescriptionTemplate ¶
func (provider *Provider) GetOpenSearchDescriptionTemplate(hostname string) (*template.Template, error)
GetOpenSearchDescriptionTemplate returns the template for conversion.
func (*Provider) GetRSSTemplate ¶
GetRSSTemplate returns the template for RSS feeds.
func (*Provider) GetRobotsTxtTemplate ¶
GetRobotsTxtTemplate returns the template for robots.txt.
func (*Provider) GetSearchTemplate ¶
GetSearchTemplate returns the search template.
func (*Provider) GetSimpleTemplate ¶
func (provider *Provider) GetSimpleTemplate(templateName, hostname string) (*template.Template, error)
GetSimpleTemplate returns a simple template without wrapping or combination with other templates.
func (*Provider) GetSitemapEntryTemplate ¶
func (provider *Provider) GetSitemapEntryTemplate(hostname string) (template *template.Template, childPlaceholder string, err error)
GetSitemapEntryTemplate returns the sitemap-entry template.
func (*Provider) GetSitemapTemplate ¶
GetSitemapTemplate returns the sitemap template.
func (*Provider) GetSnippetTemplate ¶
func (provider *Provider) GetSnippetTemplate(snippetName, hostname string) (*template.Template, error)
GetSnippetTemplate returns a snippet template without wrapping or combination with other templates.
func (*Provider) GetTagMapTemplate ¶
GetTagMapTemplate returns the template for tags.
func (*Provider) GetXMLSitemapTemplate ¶
GetXMLSitemapTemplate returns the template for XML sitemaps.
func (*Provider) StoreTemplatesOnDisc ¶
StoreTemplatesOnDisc saves all templates to disc.