mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
@@ -178,13 +178,14 @@ func (pt pageTree) Parent() page.Page {
|
|||||||
return b.p
|
return b.p
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pt pageTree) Ancestors() (parents page.Pages) {
|
func (pt pageTree) Ancestors() page.Pages {
|
||||||
|
var ancestors page.Pages
|
||||||
parent := pt.Parent()
|
parent := pt.Parent()
|
||||||
for parent != nil {
|
for parent != nil {
|
||||||
parents = append(parents, parent)
|
ancestors = append(ancestors, parent)
|
||||||
parent = parent.Parent()
|
parent = parent.Parent()
|
||||||
}
|
}
|
||||||
return
|
return ancestors
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pt pageTree) Sections() page.Pages {
|
func (pt pageTree) Sections() page.Pages {
|
||||||
|
Reference in New Issue
Block a user