mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
hugolib, output: Restrict Render to regular Pages
Using it for list pages doesn't work and has potential weird side-effects. The user probably meant to range over .Site.ReqularPages, and that is now marked clearly in the log.
This commit is contained in:
@@ -1721,3 +1721,11 @@ func (p *Page) setValuesForKind(s *Site) {
|
||||
p.URLPath.URL = "/" + path.Join(p.sections...) + "/"
|
||||
}
|
||||
}
|
||||
|
||||
// Used in error logs.
|
||||
func (p *Page) pathOrTitle() string {
|
||||
if p.Path() != "" {
|
||||
return p.Path()
|
||||
}
|
||||
return p.Title
|
||||
}
|
||||
|
Reference in New Issue
Block a user