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/diagrams | |
parent | 2662faf61ff0240be1ee0d6c496b6b4a6ed55fb4 (diff) | |
download | hugo-ce524d0b5ebaef05d29fa368465f31358f26dcda.tar.gz hugo-ce524d0b5ebaef05d29fa368465f31358f26dcda.zip |
Add a page template func
Fixes #9339
Diffstat (limited to 'tpl/diagrams')
-rw-r--r-- | tpl/diagrams/init.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tpl/diagrams/init.go b/tpl/diagrams/init.go index 1ed308c57..e6356ce9c 100644 --- a/tpl/diagrams/init.go +++ b/tpl/diagrams/init.go @@ -15,6 +15,8 @@ package diagrams import ( + "context" + "github.com/gohugoio/hugo/deps" "github.com/gohugoio/hugo/tpl/internal" ) @@ -29,7 +31,7 @@ func init() { ns := &internal.TemplateFuncsNamespace{ Name: name, - Context: func(args ...any) (any, error) { return ctx, nil }, + Context: func(cctx context.Context, args ...any) (any, error) { return ctx, nil }, } return ns |