mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Fix some change detection issues on server reloads
* Fix change detection when .GetPage/site.GetPage is used from shortcode * Fix stale content for GetPage results with short name lookups on server reloads Fixes #7623 Fixes #7624 Fixes #7625
This commit is contained in:
@@ -23,10 +23,17 @@ import (
|
||||
|
||||
// New returns a new instance of the fmt-namespaced template functions.
|
||||
func New(d *deps.Deps) *Namespace {
|
||||
return &Namespace{
|
||||
ns := &Namespace{
|
||||
errorLogger: helpers.NewDistinctLogger(d.Log.ERROR),
|
||||
warnLogger: helpers.NewDistinctLogger(d.Log.WARN),
|
||||
}
|
||||
|
||||
d.BuildStartListeners.Add(func() {
|
||||
ns.errorLogger.Reset()
|
||||
ns.warnLogger.Reset()
|
||||
})
|
||||
|
||||
return ns
|
||||
}
|
||||
|
||||
// Namespace provides template functions for the "fmt" namespace.
|
||||
|
Reference in New Issue
Block a user