mirror of
https://github.com/danog/gojekyll.git
synced 2024-11-27 14:24:41 +01:00
27 lines
530 B
Go
27 lines
530 B
Go
|
package liquid
|
||
|
|
||
|
import "io"
|
||
|
|
||
|
// Engine is a configured liquid engine.
|
||
|
type Engine interface {
|
||
|
Parse([]byte) (Template, error)
|
||
|
ParseAndRender([]byte, map[string]interface{}) ([]byte, error)
|
||
|
}
|
||
|
|
||
|
// Template is a liquid template.
|
||
|
type Template interface {
|
||
|
Render(map[string]interface{}) ([]byte, error)
|
||
|
}
|
||
|
|
||
|
type LocalEngine interface {
|
||
|
Engine
|
||
|
IncludeHandler(func(string, io.Writer, map[string]interface{}))
|
||
|
LinkHandler(LinkHandler)
|
||
|
}
|
||
|
|
||
|
type RemoteEngine interface {
|
||
|
Engine
|
||
|
FileUrlMap(map[string]string)
|
||
|
IncludeDirs([]string)
|
||
|
}
|