mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
committed by
Bjørn Erik Pedersen
parent
38f68cd162
commit
a6e8439176
@@ -112,6 +112,14 @@ func (i Taxonomy) ByCount() OrderedTaxonomy {
|
||||
return ia
|
||||
}
|
||||
|
||||
// Page returns the taxonomy page or nil if the taxonomy has no terms.
|
||||
func (i Taxonomy) Page() Page {
|
||||
for _, v := range i {
|
||||
return v.Page().Parent()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Pages returns the Pages for this taxonomy.
|
||||
func (ie OrderedTaxonomyEntry) Pages() Pages {
|
||||
return ie.WeightedPages.Pages()
|
||||
|
Reference in New Issue
Block a user