resource/page: Add Page.Ancestors

Fixes #10567
This commit is contained in:
Septs
2022-11-30 12:02:57 +08:00
committed by Bjørn Erik Pedersen
parent 7874b96815
commit 3a216186b2
7 changed files with 38 additions and 12 deletions

View File

@@ -407,6 +407,9 @@ type TreeProvider interface {
// To get a section's subsections, see Page's Sections method.
Parent() Page
// Ancestors returns the ancestors of each page
Ancestors() Pages
// Sections returns this section's subsections, if any.
// Note that for non-sections, this method will always return an empty list.
Sections() Pages