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