mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
5fd1e74903
``` git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash ``` Closes #11925
989 B
989 B
An ordered taxonomy is a slice, where each element is an object that contains the term and a slice of its weighted pages.
Each element of the slice provides these methods:
- Count
- (
int
) Returns the number of pages to which the term is assigned. - Page
- (
page.Page
) Returns the term'sPage
object, useful for linking to the term page. - Pages
- (
page.Pages
) Returns aPages
object containing thePage
objects to which the term is assigned, sorted by taxonomic weight. To sort or group, use any of the methods available to thePages
object. For example, sort by the last modification date. - Term
- (
string
) Returns the term name. - WeightedPages
- (
page.WeightedPages
) Returns a slice of weighted pages to which the term is assigned, sorted by taxonomic weight. ThePages
method above is more flexible, allowing you to sort and group.