summaryrefslogtreecommitdiffstats
path: root/hugolib/content_map.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-03-16 11:37:57 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-03-16 17:37:36 +0100
commit03b93bb9884ea479c855c2699e8c7b039dce6224 (patch)
treed6453cf01896ab65596b34e02ebb561c26e672b7 /hugolib/content_map.go
parent94fb4dc3dddf6803265316a7b8cfe81c29a83e91 (diff)
Add .RegularPagesRecursive
Fixes #6411
Diffstat (limited to 'hugolib/content_map.go')
-rw-r--r--hugolib/content_map.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/hugolib/content_map.go b/hugolib/content_map.go
index efa2254b2..2ea36ff31 100644
--- a/hugolib/content_map.go
+++ b/hugolib/content_map.go
@@ -941,6 +941,19 @@ func (c *contentTreeRef) collectPages() page.Pages {
return pas
}
+func (c *contentTreeRef) collectPagesRecursive() page.Pages {
+ var pas page.Pages
+ c.m.collectPages(c.key+cmBranchSeparator, func(c *contentNode) {
+ pas = append(pas, c.p)
+ })
+ c.m.collectPages(c.key+"/", func(c *contentNode) {
+ pas = append(pas, c.p)
+ })
+ page.SortByDefault(pas)
+
+ return pas
+}
+
func (c *contentTreeRef) collectPagesAndSections() page.Pages {
var pas page.Pages
c.m.collectPagesAndSections(c.key, func(c *contentNode) {