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 ¶ added in v0.10.0
GetAliasIndexTemplate returns the alias-index template.
func (*Provider) GetConversionTemplate ¶ added in v0.10.0
GetConversionTemplate returns the template for conversion.
func (*Provider) GetErrorTemplate ¶ added in v0.10.0
GetErrorTemplate returns the template for error pages.
func (*Provider) GetItemTemplate ¶ added in v0.10.0
GetItemTemplate returns the item template for the given item type (e.g. document, presentation).
func (*Provider) GetOpenSearchDescriptionTemplate ¶ added in v0.10.0
func (provider *Provider) GetOpenSearchDescriptionTemplate(hostname string) (*template.Template, error)
GetOpenSearchDescriptionTemplate returns the template for conversion.
func (*Provider) GetRSSTemplate ¶ added in v0.10.0
GetRSSTemplate returns the template for RSS feeds.
func (*Provider) GetRobotsTxtTemplate ¶ added in v0.10.0
GetRobotsTxtTemplate returns the template for robots.txt.
func (*Provider) GetSearchTemplate ¶ added in v0.10.0
GetSearchTemplate returns the search template.
func (*Provider) GetSimpleTemplate ¶ added in v0.10.0
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 ¶ added in v0.10.0
func (provider *Provider) GetSitemapEntryTemplate(hostname string) (template *template.Template, childPlaceholder string, err error)
GetSitemapEntryTemplate returns the sitemap-entry template.
func (*Provider) GetSitemapTemplate ¶ added in v0.10.0
GetSitemapTemplate returns the sitemap template.
func (*Provider) GetSnippetTemplate ¶ added in v0.10.0
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 ¶ added in v0.10.0
GetTagMapTemplate returns the template for tags.
func (*Provider) GetXMLSitemapTemplate ¶ added in v0.10.0
GetXMLSitemapTemplate returns the template for XML sitemaps.
func (*Provider) StoreTemplatesOnDisc ¶
StoreTemplatesOnDisc saves all templates to disc.