mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +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:
@@ -19,7 +19,10 @@ import (
|
||||
"html/template"
|
||||
"time"
|
||||
|
||||
"github.com/gohugoio/hugo/identity"
|
||||
|
||||
"github.com/gohugoio/hugo/hugofs/files"
|
||||
"github.com/gohugoio/hugo/tpl"
|
||||
|
||||
"github.com/gohugoio/hugo/hugofs"
|
||||
|
||||
@@ -170,6 +173,10 @@ func (p *nopPage) GetPage(ref string) (Page, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (p *nopPage) GetPageWithTemplateInfo(info tpl.Info, ref string) (Page, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (p *nopPage) GetParam(key string) interface{} {
|
||||
return nil
|
||||
}
|
||||
@@ -484,3 +491,7 @@ func (p *nopPage) Weight() int {
|
||||
func (p *nopPage) WordCount() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (p *nopPage) GetIdentity() identity.Identity {
|
||||
return identity.NewPathIdentity("content", "foo/bar.md")
|
||||
}
|
||||
|
Reference in New Issue
Block a user