From ce524d0b5ebaef05d29fa368465f31358f26dcda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 25 Feb 2023 09:24:59 +0100 Subject: Add a page template func Fixes #9339 --- tpl/partials/init.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tpl/partials/init.go') diff --git a/tpl/partials/init.go b/tpl/partials/init.go index 2662b8894..e9d901bbf 100644 --- a/tpl/partials/init.go +++ b/tpl/partials/init.go @@ -14,6 +14,8 @@ package partials import ( + "context" + "github.com/gohugoio/hugo/deps" "github.com/gohugoio/hugo/tpl/internal" ) @@ -26,7 +28,7 @@ func init() { ns := &internal.TemplateFuncsNamespace{ Name: namespaceName, - Context: func(args ...any) (any, error) { return ctx, nil }, + Context: func(cctx context.Context, args ...any) (any, error) { return ctx, nil }, } ns.AddMethodMapping(ctx.Include, -- cgit v1.2.3