Skip to content

Commit

Permalink
Add page collection quick reference
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Nov 19, 2023
1 parent 699de88 commit 36f207f
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 9 deletions.
2 changes: 1 addition & 1 deletion content/en/quick-reference/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Quick reference
title: Quick reference guides
linkTitle: Overview
description: Quick reference guides to Hugo's features, functions, and methods.
categories: []
Expand Down
7 changes: 3 additions & 4 deletions content/en/quick-reference/emojis.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
title: Emoji quick reference guide
linkTitle: Emojis
title: Emojis
description: Include emoji shortcodes in your markdown or templates.
categories: [quick reference]
keywords: [emoji]
menu:
docs:
parent: quick-reference
weight: 40
weight: 40
weight: 50
weight: 50
toc: true
---

Expand Down
3 changes: 1 addition & 2 deletions content/en/quick-reference/functions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Function quick reference guide
linkTitle: Functions
title: Functions
description: A quick reference guide to Hugo's functions, grouped by namespace. Aliases, if any, appear in parentheses to the right of the function name.
categories: [quick reference]
keywords: []
Expand Down
3 changes: 1 addition & 2 deletions content/en/quick-reference/methods.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Method quick reference guide
linkTitle: Methods
title: Methods
description: A quick reference guide to Hugo's methods, grouped by object.
categories: [quick reference]
keywords: []
Expand Down
46 changes: 46 additions & 0 deletions content/en/quick-reference/page-collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Page collections
description: A quick reference guide to Hugo's page collections.
categories: [quick reference]
keywords: []
menu:
docs:
parent: quick-reference
weight: 40
weight: 40
toc: true
---

## Page

Use these `Page` methods when rendering lists on [section] pages, [taxonomy] pages, [term] pages, and the home page.

[section]: /getting-started/glossary/#section
[taxonomy]: /getting-started/glossary/#taxonomy
[term]: /getting-started/glossary/#term

{{< 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.

[`where`]: /functions/collections/where

## Sort

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. >}}

0 comments on commit 36f207f

Please sign in to comment.