mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user