aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/templates
diff options
context:
space:
mode:
authorn1xx1 <[email protected]>2024-08-01 12:14:29 +0200
committerGitHub <[email protected]>2024-08-01 12:14:29 +0200
commit566fe7ba12e7ecabadffa9ec76b319d04063c78b (patch)
tree227ffdfe6d1cb203f87f2930b9d892adb243805c /tpl/templates
parent92573012e83bf8d71a247027d2f7f7f43a9c42b7 (diff)
downloadhugo-566fe7ba12e7ecabadffa9ec76b319d04063c78b.tar.gz
hugo-566fe7ba12e7ecabadffa9ec76b319d04063c78b.zip
resources/page: Expand parmalinks tokens in `url`
This change allows to use permalink tokens in url front matter fields. This should be useful to target more specific pages instead of using a global permalink configuration. It's expected to be used with cascade. Fixes #9714
Diffstat (limited to 'tpl/templates')
-rw-r--r--tpl/templates/templates.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tpl/templates/templates.go b/tpl/templates/templates.go
index 98b4b4c38..0be44a013 100644
--- a/tpl/templates/templates.go
+++ b/tpl/templates/templates.go
@@ -90,14 +90,14 @@ func (ns *Namespace) DoDefer(ctx context.Context, id string, optsv any) string {
id = fmt.Sprintf("%s_%s%s", id, key, tpl.HugoDeferredTemplateSuffix)
- _ = ns.deps.BuildState.DeferredExecutions.Executions.GetOrCreate(id,
- func() *tpl.DeferredExecution {
+ _, _ = ns.deps.BuildState.DeferredExecutions.Executions.GetOrCreate(id,
+ func() (*tpl.DeferredExecution, error) {
return &tpl.DeferredExecution{
TemplateName: templateName,
Ctx: ctx,
Data: opts.Data,
Executed: false,
- }
+ }, nil
})
return id