Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'

This commit is contained in:
Bjørn Erik Pedersen
2025-04-10 13:04:51 +02:00
987 changed files with 12379 additions and 14083 deletions

View File

@@ -3,16 +3,13 @@ title: RegularPages
description: Returns a collection of all regular pages.
categories: []
keywords: []
action:
related:
- methods/site/AllPages
- methods/site/RegularPages
- methods/site/Sections
returnType: page.Pages
signatures: [SITE.RegularPages]
params:
functions_and_methods:
returnType: page.Pages
signatures: [SITE.RegularPages]
---
The `RegularPages` method on a `Site` object returns a collection of all [regular pages](g).
The `RegularPages` method on a `Site` object returns a collection of all [regular pages](g), in the [default sort order](g).
```go-html-template
{{ range .Site.RegularPages }}
@@ -20,14 +17,9 @@ The `RegularPages` method on a `Site` object returns a collection of all [regula
{{ end }}
```
By default, Hugo sorts page collections by:
{{% glossary-term "default sort order" %}}
1. The page `weight` as defined in front matter
1. The page `date` as defined in front matter
1. The page `linkTitle` as defined in front matter
1. The file path
If the `linkTitle` is not defined, Hugo evaluates the `title` instead.
[default sort order](g)
To change the sort order, use any of the `Pages` [sorting methods]. For example: