mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 22:01:40 +00:00
c507e2717d
Now: * The template API lives in /tpl * The rest lives in /tpl/tplimpl This is bound te be more improved in the future. Updates #2701
27 lines
899 B
Go
27 lines
899 B
Go
package tpl
|
|
|
|
import (
|
|
"html/template"
|
|
"io"
|
|
)
|
|
|
|
// TODO(bep) make smaller
|
|
type Template interface {
|
|
ExecuteTemplate(wr io.Writer, name string, data interface{}) error
|
|
ExecuteTemplateToHTML(context interface{}, layouts ...string) template.HTML
|
|
Lookup(name string) *template.Template
|
|
Templates() []*template.Template
|
|
New(name string) *template.Template
|
|
GetClone() *template.Template
|
|
LoadTemplates(absPath string)
|
|
LoadTemplatesWithPrefix(absPath, prefix string)
|
|
AddTemplate(name, tpl string) error
|
|
AddTemplateFileWithMaster(name, overlayFilename, masterFilename string) error
|
|
AddAceTemplate(name, basePath, innerPath string, baseContent, innerContent []byte) error
|
|
AddInternalTemplate(prefix, name, tpl string) error
|
|
AddInternalShortcode(name, tpl string) error
|
|
Partial(name string, contextList ...interface{}) template.HTML
|
|
PrintErrors()
|
|
Funcs(funcMap template.FuncMap)
|
|
MarkReady()
|
|
}
|