diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-02-25 09:24:59 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-02-25 19:53:18 +0100 |
commit | ce524d0b5ebaef05d29fa368465f31358f26dcda (patch) | |
tree | e5df54a5deeefacbff4916d3619f85c2cb341b01 /tpl/partials | |
parent | 2662faf61ff0240be1ee0d6c496b6b4a6ed55fb4 (diff) | |
download | hugo-ce524d0b5ebaef05d29fa368465f31358f26dcda.tar.gz hugo-ce524d0b5ebaef05d29fa368465f31358f26dcda.zip |
Add a page template func
Fixes #9339
Diffstat (limited to 'tpl/partials')
-rw-r--r-- | tpl/partials/init.go | 4 |
1 files changed, 3 insertions, 1 deletions
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, |