mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
@@ -53,8 +53,8 @@ type UnusedTemplatesProvider interface {
|
||||
// TemplateHandler finds and executes templates.
|
||||
type TemplateHandler interface {
|
||||
TemplateFinder
|
||||
Execute(t Template, wr io.Writer, data interface{}) error
|
||||
ExecuteWithContext(ctx context.Context, t Template, wr io.Writer, data interface{}) error
|
||||
Execute(t Template, wr io.Writer, data any) error
|
||||
ExecuteWithContext(ctx context.Context, t Template, wr io.Writer, data any) error
|
||||
LookupLayout(d output.LayoutDescriptor, f output.Format) (Template, bool, error)
|
||||
HasTemplate(name string) bool
|
||||
}
|
||||
@@ -149,7 +149,7 @@ type TemplateFuncGetter interface {
|
||||
|
||||
// GetDataFromContext returns the template data context (usually .Page) from ctx if set.
|
||||
// NOte: This is not fully implemented yet.
|
||||
func GetDataFromContext(ctx context.Context) interface{} {
|
||||
func GetDataFromContext(ctx context.Context) any {
|
||||
return ctx.Value(texttemplate.DataContextKey)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user