mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
committed by
Bjørn Erik Pedersen
parent
7874b96815
commit
3a216186b2
@@ -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
|
||||
|
@@ -348,6 +348,10 @@ func (p *nopPage) Parent() Page {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *nopPage) Ancestors() Pages {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *nopPage) Path() string {
|
||||
return ""
|
||||
}
|
||||
|
@@ -416,6 +416,10 @@ func (p *testPage) Parent() Page {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (p *testPage) Ancestors() Pages {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (p *testPage) Path() string {
|
||||
return p.path
|
||||
}
|
||||
|
Reference in New Issue
Block a user