mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -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:
|
||||
|
||||
|
Reference in New Issue
Block a user