diff options
Diffstat (limited to 'hugolib/page.go')
-rw-r--r-- | hugolib/page.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index f0f695227..16c320ecd 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -171,6 +171,14 @@ func (p *pageState) getPages() page.Pages { return b.getPages() } +func (p *pageState) getPagesRecursive() page.Pages { + b := p.bucket + if b == nil { + return nil + } + return b.getPagesRecursive() +} + func (p *pageState) getPagesAndSections() page.Pages { b := p.bucket if b == nil { @@ -179,6 +187,24 @@ func (p *pageState) getPagesAndSections() page.Pages { return b.getPagesAndSections() } +func (p *pageState) RegularPagesRecursive() page.Pages { + p.regularPagesRecursiveInit.Do(func() { + var pages page.Pages + switch p.Kind() { + case page.KindSection: + pages = p.getPagesRecursive() + default: + pages = p.RegularPages() + } + p.regularPagesRecursive = pages + }) + return p.regularPagesRecursive +} + +func (p *pageState) PagesRecursive() page.Pages { + return nil +} + func (p *pageState) RegularPages() page.Pages { p.regularPagesInit.Do(func() { var pages page.Pages |