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:
n1xx1
2024-08-01 12:14:29 +02:00
committed by GitHub
parent 92573012e8
commit 566fe7ba12
7 changed files with 101 additions and 21 deletions

View File

@@ -268,7 +268,8 @@ func IsContextType(tp reflect.Type) bool {
return true
}
return isContextCache.GetOrCreate(tp, func() bool {
return tp.Implements(contextInterface)
isContext, _ := isContextCache.GetOrCreate(tp, func() (bool, error) {
return tp.Implements(contextInterface), nil
})
return isContext
}