mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Allow headless bundles to list pages via $page.Pages and $page.RegularPages
Fixes #7075
This commit is contained in:
@@ -248,7 +248,7 @@ func (s *Site) prepareInits() {
|
||||
s.init.prevNextInSection = init.Branch(func() (interface{}, error) {
|
||||
|
||||
var sections page.Pages
|
||||
s.home.treeRef.m.collectSectionsRecursiveIncludingSelf(s.home.treeRef.key, func(n *contentNode) {
|
||||
s.home.treeRef.m.collectSectionsRecursiveIncludingSelf(pageMapQuery{Prefix: s.home.treeRef.key}, func(n *contentNode) {
|
||||
sections = append(sections, n.p)
|
||||
})
|
||||
|
||||
@@ -281,7 +281,7 @@ func (s *Site) prepareInits() {
|
||||
treeRef := sect.(treeRefProvider).getTreeRef()
|
||||
|
||||
var pas page.Pages
|
||||
treeRef.m.collectPages(treeRef.key+cmBranchSeparator, func(c *contentNode) {
|
||||
treeRef.m.collectPages(pageMapQuery{Prefix: treeRef.key + cmBranchSeparator}, func(c *contentNode) {
|
||||
pas = append(pas, c.p)
|
||||
})
|
||||
page.SortByDefault(pas)
|
||||
@@ -293,7 +293,7 @@ func (s *Site) prepareInits() {
|
||||
treeRef := s.home.getTreeRef()
|
||||
|
||||
var pas page.Pages
|
||||
treeRef.m.collectPages(treeRef.key+cmBranchSeparator, func(c *contentNode) {
|
||||
treeRef.m.collectPages(pageMapQuery{Prefix: treeRef.key + cmBranchSeparator}, func(c *contentNode) {
|
||||
pas = append(pas, c.p)
|
||||
})
|
||||
page.SortByDefault(pas)
|
||||
|
Reference in New Issue
Block a user