Debian Codegraph @

docs/content/en/methods/site/RegularPages.md

raw
1 ---
2 title: RegularPages
3 description: Returns a collection of all regular pages.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: page.Pages
9 signatures: [SITE.RegularPages]
10 ---
11
12 The `RegularPages` method on a `Site` object returns a collection of all [regular pages](g), in the [default sort order](g).
13
14 ```go-html-template
15 {{ range .Site.RegularPages }}
16 <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
17 {{ end }}
18 ```
19
20 {{% glossary-term "default sort order" %}}
21
22 [default sort order](g)
23
24 To change the sort order, use any of the `Pages` [sorting methods]. For example:
25
26 ```go-html-template
27 {{ range .Site.RegularPages.ByTitle }}
28 <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
29 {{ end }}
30 ```
31
32 [sorting methods]: /methods/pages/