1.7 KiB
title | description | categories | keywords | menu | weight | toc | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Page collections | A quick reference guide to Hugo's page collections. |
|
|
50 | true |
Page
Use these Page
methods when rendering lists on section pages, taxonomy pages, term pages, and the home page.
{{< list-pages-in-section path=/methods/page filter=methods_page_page_collections filterType=include omitElementIDs=true titlePrefix=PAGE. >}}
Site
Use these Site
methods when rendering lists on any page.
{{< list-pages-in-section path=/methods/site filter=methods_site_page_collections filterType=include omitElementIDs=true titlePrefix=SITE. >}}
Filter
Use the where
function to filter page collections.
Sort
By default, Hugo sorts page collections by:
- Weight
- Date in descending order
- LinkTitle falling back to Title
- Filename if the page is backed by a file
Use these methods to sort page collections.
{{< list-pages-in-section path=/methods/pages filter=methods_pages_sort filterType=include titlePrefix=. omitElementIDs=true titlePrefix=PAGES. >}}
Group
Use these methods to group page collections.
{{< list-pages-in-section path=/methods/pages filter=methods_pages_group filterType=include titlePrefix=. omitElementIDs=true titlePrefix=PAGES. >}}