summaryrefslogtreecommitdiffstats
path: root/tpl/time
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-02-25 09:24:59 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-02-25 19:53:18 +0100
commitce524d0b5ebaef05d29fa368465f31358f26dcda (patch)
treee5df54a5deeefacbff4916d3619f85c2cb341b01 /tpl/time
parent2662faf61ff0240be1ee0d6c496b6b4a6ed55fb4 (diff)
Add a page template func
Fixes #9339
Diffstat (limited to 'tpl/time')
-rw-r--r--tpl/time/init.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tpl/time/init.go b/tpl/time/init.go
index 4bb2ddf67..583dacd4a 100644
--- a/tpl/time/init.go
+++ b/tpl/time/init.go
@@ -14,6 +14,7 @@
package time
import (
+ "context"
"errors"
"github.com/gohugoio/hugo/deps"
@@ -32,7 +33,7 @@ func init() {
ns := &internal.TemplateFuncsNamespace{
Name: name,
- Context: func(args ...any) (any, error) {
+ Context: func(cctx context.Context, args ...any) (any, error) {
// Handle overlapping "time" namespace and func.
//
// If no args are passed to `time`, assume namespace usage and